-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
60 lines (39 loc) · 1.75 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
# include paths
INC = -I ./include
# shared
command.o: src/shared/command.h src/shared/command.cpp
g++ -c src/shared/command.cpp -o command.o $(INC)
message.o: src/shared/message.h src/shared/message.cpp
g++ -c src/shared/message.cpp -o message.o $(INC)
response.o: src/shared/response.h src/shared/response.cpp
g++ -c src/shared/response.cpp -o response.o $(INC)
# client
client.o: src/client/client.h src/client/client.cpp
g++ -c src/client/client.cpp -o client.o $(INC)
main_client.o: src/client/main.cpp
g++ -c src/client/main.cpp -o main_client.o $(INC)
client.exe: client.o main_client.o command.o message.o response.o
g++ client.o main_client.o command.o message.o response.o -o client.exe -ljsoncpp
rm -f client.o main_client.o
# server
server.o: src/server/server.h src/server/server.cpp
g++ -c src/server/server.cpp -o server.o $(INC)
main_server.o: src/server/main.cpp
g++ -c src/server/main.cpp -o main_server.o $(INC)
topic.o: src/server/topic.h src/server/topic.cpp
g++ -c src/server/topic.cpp -o topic.o $(INC)
clientconnection.o: src/server/clientconnection.h src/server/clientconnection.cpp
g++ -c src/server/clientconnection.cpp -o clientconnection.o $(INC)
server.exe: server.o main_server.o command.o message.o response.o clientconnection.o topic.o
g++ server.o main_server.o topic.o clientconnection.o command.o message.o response.o -o server.exe -ljsoncpp
rm -f server.o main_server.o
# general
clean:
rm -f client.o server.o main_client.o main_server.o clientconnection.o topic.o command.o message.o response.o client.exe server.exe
all: client.exe server.exe
compile-all: client.exe server.exe
compile-all-and-run-client: client.exe server.exe
./client.exe
compile-all-and-run-server: client.exe server.exe
./server.exe
.PHONY: clean