npm

Nihal's Password Manager (WIP)
git clone git://git.nihaljere.xyz/npm
Log | Files | Refs | LICENSE

commit 55fc794cac34496fb5f1ba9d0824683ce976a23d
parent ba1daa587d4ad3057c54099d5f410f2bc32ba2ca
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Tue,  7 Sep 2021 13:02:34 -0500

NPM_CORE settable in Makefile

Diffstat:
MMakefile | 5++++-
Mnpm-agent.c | 2+-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -5,6 +5,9 @@ PREFIX = /usr/local LIBS = argon2/argon2.a SRC = chacha20.c npm.c util.c OBJ = $(SRC:%.c=%.o) +NPM_CORE = "npm-core" + +CFLAGS = '-DNPM_CORE=$(NPM_CORE)' all: npm-core npm-agent npmc @@ -18,7 +21,7 @@ npmc: npmc.o $(CC) -static npmc.o -o $@ .c.o: - $(CC) -c $< -o $@ + $(CC) $(CFLAGS) -c $< -o $@ install: install -Dm755 -t $(DESTDIR)$(PREFIX)/bin npm npm-core npmc npm-agent diff --git a/npm-agent.c b/npm-agent.c @@ -36,7 +36,7 @@ #define TIMER 1 #define CLIENT 2 -char *corecmd[] = { "./npm-core", "-d", NULL, NULL }; +char *corecmd[] = { NPM_CORE, "-d", NULL, NULL }; //char *const getpasscmd[] = { "dmenu", "-P", "-p", "Password:", NULL }; char *const getpasscmd[] = { "bemenu", "-x", "-p", "Password:", NULL };