-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (31 loc) · 1.56 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
all: compilelibraries compilecode compileapps
#=================================================
compileapps: server client main
server: compiled/sside.o compiled/lib/encrypt.o compiled/lib/deque.o
gcc -pthread -Wall compiled/sside.o compiled/lib/encrypt.o compiled/lib/deque.o -o server
client: compiled/clside.o compiled/lib/encrypt.o
gcc -pthread -Wall compiled/clside.o compiled/lib/encrypt.o -o client
main: compiled/main.o compiled/lib/encrypt.o
gcc -pthread -Wall compiled/main.o compiled/lib/encrypt.o -o main
#=================================================
compilecode: compiled/clside.o compiled/sside.o compiled/main.o
compiled/clside.o: source/clside.c source/clside.h
gcc -c -pthread -Wall source/clside.c -o compiled/clside.o
compiled/sside.o: source/sside.c source/sside.h
gcc -c -pthread -Wall source/sside.c -o compiled/sside.o
compiled/main.o: source/main.c source/main.h
gcc -c -pthread -Wall source/main.c -o compiled/main.o
#================================================
compilelibraries: compiled/lib/encrypt.o compiled/lib/deque.o
compiled/lib/encrypt.o: source/lib/encrypt.c source/lib/encrypt.h
gcc -c -lm -Wall source/lib/encrypt.c -o compiled/lib/encrypt.o
compiled/lib/deque.o:source/lib/deque.c source/lib/deque.h
gcc -c -lm -Wall source/lib/deque.c -o compiled/lib/deque.o
#=================================================
clean: cleancompiled cleanlibraries cleanapps
cleanapps:
rm -f app server client
cleanlibraries:
rm -f compiled/lib/*.o
cleancompiled:
rm -f compiled/*.o