-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathMakefile
41 lines (23 loc) · 828 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
34
35
36
37
38
39
40
41
all: libcalc test client server serverD
servermain.o: servermain.cpp protocol.h
$(CXX) -Wall -c servermain.cpp -I.
servermainD.o: servermain.cpp protocol.h
$(CXX) -Wall -c servermain.cpp -I. -DDEBUG -o servermainD.o
clientmain.o: clientmain.cpp protocol.h
$(CXX) -Wall -c clientmain.cpp -I.
main.o: main.cpp protocol.h
$(CXX) -Wall -c main.cpp -I.
test: main.o calcLib.o
$(CXX) -L./ -Wall -o test main.o -lcalc
client: clientmain.o calcLib.o
$(CXX) -L./ -Wall -o client clientmain.o -lcalc
server: servermain.o calcLib.o
$(CXX) -L./ -Wall -o server servermain.o -lcalc
serverD: servermainD.o calcLib.o
$(CXX) -L./ -Wall -o serverD servermainD.o -lcalc
calcLib.o: calcLib.c calcLib.h
gcc -Wall -fPIC -c calcLib.c
libcalc: calcLib.o
ar -rc libcalc.a -o calcLib.o
clean:
rm *.o *.a test server client