aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-10-04 22:30:21 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-10-04 22:30:21 +0200
commit14349a88dd90fd7643b57bca83d8027d1a0224cb (patch)
treebf828123e5ca8db74b3dcc6b9870e8766424274b
parentc077e054b42bf2b9fd912190ddc241735e71e626 (diff)
Add an install target
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ee0b462..3b60d78 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,9 @@ CFLAGS = \
-O3 -march=native -mtune=native -pipe
LDLIBS = -lfl
+PREFIX = /usr/local
+DPREFIX = ${DESTDIR}${PREFIX}
+
all: ${target}
${target}: lex.yy.c
${CC} ${CFLAGS} ${LDLIBS} -o $@ $<
@@ -14,5 +17,10 @@ ${target}: lex.yy.c
lex.yy.c: main.l
${LEX} $<
+install:
+ mkdir -p ${DPREFIX}/bin ${DPREFIX}/share/man/man1
+ cp ${target} ${DPREFIX}/bin
+ cp ${target}.1 ${DPREFIX}/share/man/man1
+
clean:
rm -f ${target} lex.yy.c