forked from patrikarlos/np_assignment1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (21 loc) · 680 Bytes
/
Copy pathMakefile
File metadata and controls
34 lines (21 loc) · 680 Bytes
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
CC_FLAGS= -Wall -I.
LD_FLAGS= -Wall -L./
all: libcalc test client server
servermain.o: servermain.cpp
$(CXX) $(CC_FLAGS) $(CFLAGS) -c servermain.cpp
clientmain.o: clientmain.cpp
$(CXX) $(CC_FLAGS) $(CFLAGS) -c clientmain.cpp
main.o: main.cpp
$(CXX) $(CC_FLAGS) $(CFLAGS) -c main.cpp
test: main.o calcLib.o
$(CXX) $(LD_FLAGS) -o test main.o -lcalc
client: clientmain.o calcLib.o
$(CXX) $(LD_FLAGS) -o client clientmain.o -lcalc
server: servermain.o calcLib.o
$(CXX) $(LD_FLAGS) -o server servermain.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