-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
30 lines (21 loc) · 718 Bytes
/
makefile
File metadata and controls
30 lines (21 loc) · 718 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
OBJS = server_test.o client_test.o Socket.o Client.o Server.o
FILES = server_test.cpp client_test.cpp Socket.h Client.h Server.h
CC = g++
CFLAGS = -Wall -c -std=c++11
LFLAGS = -Wall -pthread
server: server_test.o Socket.o Server.o
$(CC) $(LFLAGS) server_test.o Socket.o Server.o -o server
client: client_test.o Socket.o Client.o
$(CC) $(LFLAGS) client_test.o Socket.o Client.o -o client
client_test.o: $(FILES)
$(CC) $(CFLAGS) client_test.cpp
server_test.o: $(FILES)
$(CC) $(CFLAGS) server_test.cpp
Client.o: Client.h Client.cpp
$(CC) $(CFLAGS) Client.cpp
Server.o: Server.h Server.cpp
$(CC) $(CFLAGS) Server.cpp
Socket.o: Socket.h Socket.cpp
$(CC) $(CFLAGS) Socket.cpp
clean:
rm *.o *~ server client