-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
92 lines (63 loc) · 3.31 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
TARGETS = safefs
CC ?= gcc
CFLAGS = -Wall -g
CFLAGS_FUSE = -D_FILE_OFFSET_BITS=64
LIBFUSE_INCLUDE_DIR = $(shell pkg-config --cflags fuse)
LIBFUSE_LIB = $(shell pkg-config --libs fuse)
CFLAGS_LIBFUSE = $(CFLAGS) $(LIBFUSE_INCLUDE_DIR) $(LIBFUSE_LIB)
CFLAGS_EXTRA = -Wall -g -lzlog -lpthread
LIBCRYPT_FLAGS = `libgcrypt-config --cflags`
GNULIB_FLAGS = `pkg-config --cflags --libs glib-2.0`
OPENSSL_FLAGS = -lssl -lcrypto
LIBERASURECODE_FLAGS = -lerasurecode -ldl
COMP_FLAGS = -Wall -g
all: safefs
logdef.o: logdef.c
$(CC) $< `pkg-config --cflags --libs glib-2.0` $(CFLAGS_EXTRA) -c -o $@
utils.o: utils.c
$(CC) $< $(CFLAGS_EXTRA) -c -o $@
nopcrypt.o: crypto/nopcrypt.c
$(CC) $< $(CFLAGS_EXTRA) $(CFLAGS_LIBFUSE) -fpic -c -o $@
nopcrypt_padded.o:crypto/nopcrypt_padded.c
$(CC) $< $(CFLAGS_EXTRA) $(CFLAGS_LIBFUSE) $(GNULIB_FLAGS) -fpic -c -o $@
xor.o: multi_loop_drivers/xor.c
$(CC) $< $(CFLAGS_EXTRA) $(CFLAGS_LIBFUSE) $(GNULIB_FLAGS) -fpic -c -o $@
rep.o: multi_loop_drivers/rep.c
$(CC) $< $(CFLAGS_EXTRA) $(CFLAGS_LIBFUSE) $(GNULIB_FLAGS) -fpic -c -o $@
erasure.o:multi_loop_drivers/erasure.c
$(CC) $< $(CFLAGS_EXTRA) $(CFLAGS_LIBFUSE) $(GNULIB_FLAGS) -fpic -c -o $@
nopalign.o: align/nopalign.c
$(CC) $< $(CFLAGS_EXTRA) $(CFLAGS_LIBFUSE) -fpic -c -o $@
nopfuse.o: nopfuse.c
$(CC) $< $(CFLAGS_EXTRA) $(CFLAGS_LIBFUSE) $(GNULIB_FLAGS) -fpic -c -o $@
blockalign.o: align/blockalign.c
$(CC) $< $(CFLAGS_EXTRA) $(GNULIB_FLAGS) $(CFLAGS_LIBFUSE) -fpic -c -o $@
timestamps.o: timestamps/timestamps.c
$(CC) $< $(CFLAGS_EXTRA) $(GNULIB_FLAGS) $(CFLAGS_LIBFUSE) -fpic -c -o $@
sfuse.o: sfuse.c
$(CC) $< -fpic $(CFLAGS_LIBFUSE) $(GNULIB_FLAGS) $(CFLAGS_EXTRA) -c -o $@ `libgcrypt-config --cflags --libs`
map.o: map/map.c
$(CC) $< $(CFLAGS) $(GNULIB_FLAGS) $(CFLAGS_EXTRA) -fpic -c -o $@
alignfuse.o: alignfuse.c
$(CC) $< -fpic $(CFLAGS_LIBFUSE) $(GNULIB_FLAGS) $(CFLAGS_EXTRA) -c -o $@ `libgcrypt-config --cflags --libs`
symmetric.o: crypto/openssl/symmetric.c
$(CC) $< $(CFLAGS) $(OPENSSL_FLAGS) -fpic -c -o $@
rand_symetric.o: crypto/rand_symmetric.c
$(CC) $< $(CFLAGS) $(OPENSSL_FLAGS) $(GNULIB_FLAGS) $(CFLAGS_LIBFUSE) -fpic -c -o $@
det_symmetric.o: crypto/det_symmetric.c
$(CC) $< $(CFLAGS) $(OPENSSL_FLAGS) $(GNULIB_FLAGS) $(CFLAGS_LIBFUSE) -fpic -c -o $@
encode.o: sfuse.o openssl_det_symmetric.o openssl_rand_symetric.o nopcrypt.o
$(CC) sfuse.o openssl_det_symmetric.o openssl_rand_symetric.o nopcrypt.o -c -o $@
sds_config.o: SFSConfig.c
$(CC) $< `pkg-config --cflags --libs glib-2.0` -c -o $@
multi_loopback.o: multi_loopback.c utils.o
$(CC) $< $(CFLAGS_LIBFUSE) $(CFLAGS_EXTRA) $(GNULIB_FLAGS) -c -o $@
inih.o: inih/ini.c
$(CC) $< -c -o $@
safefs: alignfuse.o nopalign.o blockalign.o sds_config.o logdef.o inih.o timestamps.o sfuse.o symmetric.o det_symmetric.o rand_symetric.o nopcrypt.o nopcrypt_padded.o utils.o map.o erasure.o rep.o xor.o multi_loopback.o nopfuse.o
$(CC) SFSFuse.c alignfuse.o nopalign.o blockalign.o timestamps.o sfuse.o symmetric.o det_symmetric.o rand_symetric.o rep.o xor.o erasure.o nopcrypt.o sds_config.o logdef.o inih.o nopcrypt_padded.o utils.o multi_loopback.o map.o nopfuse.o $(LIBCRYPT_FLAGS) $(CFLAGS_FUSE) $(CFLAGS_LIBFUSE) $(CFLAGS_EXTRA) $(OPENSSL_FLAGS) $(LIBERASURECODE_FLAGS) `pkg-config --cflags --libs glib-2.0` -o $@
info: $(TARGETS)
@echo
@echo
clean:
rm -f $(TARGETS) *.o