forked from thejinxters/Encrypted-Filesystem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (47 loc) · 1.4 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
CC = gcc
CFLAGSFUSE = `pkg-config fuse --cflags`
LLIBSFUSE = `pkg-config fuse --libs`
LLIBSOPENSSL = -lcrypto
CFLAGS = -c -g -Wall -Wextra
LFLAGS = -g -Wall -Wextra
FUSE_EXAMPLES = fusehello fusexmp
XATTR_EXAMPLES = xattr-util
OPENSSL_EXAMPLES = aes-crypt-util
.PHONY: all fuse-examples xattr-examples openssl-examples clean
all: fuse-examples xattr-examples openssl-examples pa5-encfs
fuse-examples: $(FUSE_EXAMPLES)
xattr-examples: $(XATTR_EXAMPLES)
openssl-examples: $(OPENSSL_EXAMPLES)
fusehello: fusehello.o
$(CC) $(LFLAGS) $^ -o $@ $(LLIBSFUSE)
fusexmp: fusexmp.o
$(CC) $(LFLAGS) $^ -o $@ $(LLIBSFUSE)
pa5-encfs: pa5-encfs.o aes-crypt.o
$(CC) $(LFLAGS) $^ -o $@ $(LLIBSFUSE) $(LLIBSOPENSSL)
xattr-util: xattr-util.o
$(CC) $(LFLAGS) $^ -o $@
aes-crypt-util: aes-crypt-util.o aes-crypt.o
$(CC) $(LFLAGS) $^ -o $@ $(LLIBSOPENSSL)
fusehello.o: fusehello.c
$(CC) $(CFLAGS) $(CFLAGSFUSE) $<
fusexmp.o: fusexmp.c
$(CC) $(CFLAGS) $(CFLAGSFUSE) $<
pa5-encfs.o: pa5-encfs.c aes-crypt.h
$(CC) $(CFLAGS) $(CFLAGSFUSE) $<
xattr-util.o: xattr-util.c
$(CC) $(CFLAGS) $<
aes-crypt-util.o: aes-crypt-util.c aes-crypt.h
$(CC) $(CFLAGS) $<
aes-crypt.o: aes-crypt.c aes-crypt.h
$(CC) $(CFLAGS) $<
clean:
rm -f $(FUSE_EXAMPLES)
rm -f $(XATTR_EXAMPLES)
rm -f $(OPENSSL_EXAMPLES)
rm -f pa5-encfs
rm -f *.o
rm -f *~
rm -f handout/*~
rm -f handout/*.log
rm -f handout/*.aux
rm -f handout/*.out