aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-11-25 22:19:27 +0100
committerGravatar Christian Hesse <mail@eworm.de>2017-11-25 22:19:27 +0100
commit63c166b19549ea41a015d4c2cb3b32d4517d6377 (patch)
treee0a4cda3823e55fe7cf4bebdbaad17ef4998cbe7
parentdc376981d4ff37108e8eba14c86c0cbe38fbfc7e (diff)
downloadmkinitcpio-ykfde-63c166b19549ea41a015d4c2cb3b32d4517d6377.tar.gz
mkinitcpio-ykfde-63c166b19549ea41a015d4c2cb3b32d4517d6377.tar.zst
link required libraries only
-rw-r--r--bin/Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/Makefile b/bin/Makefile
index 53e14bc..1af9e16 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -3,18 +3,18 @@ CC := gcc
INSTALL := install
RM := rm
# flags
-CFLAGS += -std=gnu11 -O2 -fPIC -Wall -Werror
-CFLAGS += -liniparser -lkeyutils -lykpers-1 -lyubikey
-CFLAGS += $(shell pkg-config --cflags --libs libsystemd 2>/dev/null)
-LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
+CFLAGS += -std=gnu11 -O2 -fPIC -Wall -Werror
+CFLAGS_YUBIKEY += -liniparser -lkeyutils -lykpers-1 -lyubikey
+CFLAGS_SYSTEMD += $(shell pkg-config --cflags --libs libsystemd 2>/dev/null)
+LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
all: worker ykfde ykfde-cpio
worker: worker.c ../config.h
- $(CC) $(CFLAGS) $(LDFLAGS) -o worker worker.c
+ $(CC) $(CFLAGS) $(CFLAGS_YUBIKEY) $(CFLAGS_SYSTEMD) $(LDFLAGS) -o worker worker.c
ykfde: ykfde.c ../config.h ../version.h
- $(CC) $(CFLAGS) -lcryptsetup $(LDFLAGS) -o ykfde ykfde.c
+ $(CC) $(CFLAGS) $(CFLAGS_YUBIKEY) $(CFLAGS_SYSTEMD) -lcryptsetup $(LDFLAGS) -o ykfde ykfde.c
ykfde-cpio: ykfde-cpio.c ../config.h ../version.h
$(CC) $(CFLAGS) -larchive $(LDFLAGS) -o ykfde-cpio ykfde-cpio.c