-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
33 lines (23 loc) · 918 Bytes
/
Makefile
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
29
30
31
32
33
HEADERS = main.h ui.h shares.h cyrpt.h util.h file.h common.h
OBJECTS = main.o ui.o shares.o crypt.o util.o file.o
LIBS = -lgfshare -ltomcrypt
COMPILE = gcc $(CFLAGS) -g -pedantic -std=gnu99 -Wall -Wextra -funsigned-char -Wno-pointer-sign
.c.o:
$(COMPILE) -c $< -o $@
threshcrypt: $(OBJECTS)
$(COMPILE) $(OBJECTS) $(LIBS) -o threshcrypt
threshcrypt_static: $(OBJECTS)
$(COMPILE) -static $(OBJECTS) $(LIBS) -o threshcrypt_static
strip threshcrypt_static
@which upx && upx --best threshcrypt_static || true
threshcrypt_embed: $(OBJECTS)
$(COMPILE) $(OBJECTS) -Wl,-Bstatic $(LIBS) -Wl,-Bdynamic -o threshcrypt_embed
strip threshcrypt_embed
hkdf_test: hkdf.o hkdf_test.o
$(COMPILE) hkdf.o hkdf_test.o -ltomcrypt -o hkdf_test
static: threshcrypt_static
embed: threshcrypt_embed
extra: threshcrypt threshcrypt_embed threshcrypt_static
all: threshcrypt
clean:
rm -f threshcrypt threshcrypt_* hkdf_test *.o