blob: 1af9e16a94502d1e0276f4267f17402d16e6bde0 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# commands
CC := gcc
INSTALL := install
RM := rm
# flags
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) $(CFLAGS_YUBIKEY) $(CFLAGS_SYSTEMD) $(LDFLAGS) -o worker worker.c
ykfde: ykfde.c ../config.h ../version.h
$(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
install: worker ykfde ykfde-cpio
$(INSTALL) -D -m0755 worker $(DESTDIR)/usr/lib/ykfde/worker
$(INSTALL) -D -m0755 ykfde $(DESTDIR)/usr/bin/ykfde
$(INSTALL) -D -m0755 ykfde-cpio $(DESTDIR)/usr/bin/ykfde-cpio
clean:
$(RM) -f worker ykfde ykfde-cpio
|