From bdd21b65c64c76930f159feb6e12e248b5f15a91 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 20 Aug 2023 23:13:36 +0200 Subject: Add an ‘install’ rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') 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 -- cgit v1.2.3