-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (22 loc) · 664 Bytes
/
Copy pathMakefile
File metadata and controls
27 lines (22 loc) · 664 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
CC=g++
CFLAGS=-c -Wall -std=c++11
LDFLAGS=
COMMON_SOURCES=helpers.cpp
COMMON_OBJECTS=$(COMMON_SOURCES:.cpp=.o)
SERVER_SOURCES=server.cpp ServerFunctions.cpp
SERVER_OBJECTS=$(SERVER_SOURCES:.cpp=.o)
SERVER=server
CLIENT_SOURCES=client.cpp
CLIENT_OBJECTS=$(CLIENT_SOURCES:.cpp=.o)
CLIENT=client
all: $(COMMON_OBJECTS) $(SERVER) $(CLIENT)
$(SERVER): $(COMMON_OBJECTS) $(SERVER_OBJECTS)
$(CC) $(LDFLAGS) $(COMMON_OBJECTS) $(SERVER_OBJECTS) -o $@
$(CLIENT): $(COMMON_OBJECTS) $(CLIENT_OBJECTS)
$(CC) $(LDFLAGS) $(COMMON_OBJECTS) $(CLIENT_OBJECTS) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
clean:
rm -f *.o server client
rm -f /tmp/cs_pipe
rm -f /tmp/cs_channel