safe

Password protected secret keeper
git clone git://git.z3bra.org/safe.git
Log | Files | Refs | README | LICENSE

commit d2808e58d2794e82db767b7d4f4265464c9ed182
parent 4f8efc28ce2b680632a2151e8ac53f66001add8a
Author: Willy Goiffon <dev@z3bra.org>
Date:   Tue,  2 Jul 2019 10:45:59 +0200

Put mk/make config in the same config.mk file

Diffstat:
config.mk | 10++++++++++
makefile | 26++++++++------------------
mkfile | 25++++++++-----------------
3 files changed, 26 insertions(+), 35 deletions(-)

diff --git a/config.mk b/config.mk @@ -0,0 +1,10 @@ +CC = cc +LD = ${CC} + +PREFIX = /usr/local +MANDIR = ${PREFIX}/man + +CPPFLAGS = -I/usr/local/include +CFLAGS = -g -Wall -Wextra -pedantic +LDFLAGS = -L/usr/local/lib +LDLIBS = -lsodium diff --git a/makefile b/makefile @@ -1,14 +1,4 @@ -CC = cc -LD = $(CC) - -PREFIX = /usr/local -MANPREFIX = ${PREFIX}/man - -CPPFLAGS = -I/usr/local/include -CFLAGS = -Wall -Wextra -pedantic -LDFLAGS = -L/usr/local/lib -LDLIBS = -lsodium - +include config.mk all: safe safe-agent safe: safe.o readpassphrase.o @@ -26,15 +16,15 @@ install: safe safe-agent cp safe-agent ${DESTDIR}${PREFIX}/bin/safe-agent chmod 755 ${DESTDIR}${PREFIX}/bin/safe chmod 755 ${DESTDIR}${PREFIX}/bin/safe-agent - mkdir -p ${DESTDIR}${MANPREFIX}/man1 - cp safe.1 ${DESTDIR}${MANPREFIX}/man1/safe.1 - chmod 644 ${DESTDIR}${MANPREFIX}/man1/safe.1 - cp safe-agent.1 ${DESTDIR}${MANPREFIX}/man1/safe-agent.1 - chmod 644 ${DESTDIR}${MANPREFIX}/man1/safe-agent.1 + mkdir -p ${DESTDIR}${MANDIR}/man1 + cp safe.1 ${DESTDIR}${MANDIR}/man1/safe.1 + chmod 644 ${DESTDIR}${MANDIR}/man1/safe.1 + cp safe-agent.1 ${DESTDIR}${MANDIR}/man1/safe-agent.1 + chmod 644 ${DESTDIR}${MANDIR}/man1/safe-agent.1 uninstall: rm ${DESTDIR}${PREFIX}/bin/safe rm ${DESTDIR}${PREFIX}/bin/safe-agent - rm ${DESTDIR}${MANPREFIX}/man1/safe.1 - rm ${DESTDIR}${MANPREFIX}/man1/safe-agent.1 + rm ${DESTDIR}${MANDIR}/man1/safe.1 + rm ${DESTDIR}${MANDIR}/man1/safe-agent.1 diff --git a/mkfile b/mkfile @@ -1,13 +1,4 @@ -CC = cc -LD = ${CC} - -PREFIX = /usr/local -MANPREFIX = ${PREFIX}/man - -CPPFLAGS = -I/usr/local/include -CFLAGS = -g -Wall -Wextra -pedantic -LDFLAGS = -L/usr/local/lib -LDLIBS = -lsodium +<config.mk all:V: safe safe-agent @@ -29,14 +20,14 @@ install:V: safe safe-agent cp safe-agent ${DESTDIR}${PREFIX}/bin/safe-agent chmod 755 ${DESTDIR}${PREFIX}/bin/safe chmod 755 ${DESTDIR}${PREFIX}/bin/safe-agent - mkdir -p ${DESTDIR}${MANPREFIX}/man1 - cp safe.1 ${DESTDIR}${MANPREFIX}/man1/safe.1 - chmod 644 ${DESTDIR}${MANPREFIX}/man1/safe.1 - cp safe-agent.1 ${DESTDIR}${MANPREFIX}/man1/safe-agent.1 - chmod 644 ${DESTDIR}${MANPREFIX}/man1/safe-agent.1 + mkdir -p ${DESTDIR}${MANDIR}/man1 + cp safe.1 ${DESTDIR}${MANDIR}/man1/safe.1 + chmod 644 ${DESTDIR}${MANDIR}/man1/safe.1 + cp safe-agent.1 ${DESTDIR}${MANDIR}/man1/safe-agent.1 + chmod 644 ${DESTDIR}${MANDIR}/man1/safe-agent.1 uninstall:V: rm ${DESTDIR}${PREFIX}/bin/safe rm ${DESTDIR}${PREFIX}/bin/safe-agent - rm ${DESTDIR}${MANPREFIX}/man1/safe.1 - rm ${DESTDIR}${MANPREFIX}/man1/safe-agent.1 + rm ${DESTDIR}${MANDIR}/man1/safe.1 + rm ${DESTDIR}${MANDIR}/man1/safe-agent.1