aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e368746..b8198a4 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,9 @@ CFLAGS = -Wall -Wextra -Wpedantic -Werror \
-fomit-frame-pointer -pipe
LDLIBS = -luriparser -lssl -lcrypto
+PREFIX = /usr/local
+DPREFIX = ${DESTDIR}${PREFIX}
+
all: totp
totp: main.o b32.o
${CC} ${LDLIBS} -o $@ main.o b32.o
@@ -14,5 +17,10 @@ main.o: main.c b32.h
b32.o: b32.c b32.h
${CC} ${CFLAGS} -c b32.c
+install:
+ mkdir -p ${DPREFIX}/bin ${DPREFIX}/share/man/man1
+ cp totp ${DPREFIX}/bin
+ cp totp.1 ${DPREFIX}/share/man/man1
+
clean:
rm -f totp *.o