-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (34 loc) · 942 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
42
43
44
45
46
47
48
49
50
51
52
CXX:=$(shell sh -c 'type $(CXX) >/dev/null 2>/dev/null && echo $(CXX) || echo g++')
#CXX = clang++-3.8
INSTALL = install
INCLUDES =
OPTIMIZATION = -O0
WARNINGS =
DEBUG = -g
STDC = -std=c++1y
LDFLAGS =
CFLAGS=-Wall
CXXFLAGS = $(OPTIMIZATION) -fPIC -fstack-protector -pthread $(CFLAGS) $(WARNINGS) $(DEBUG) $(STDC) -DUSE_CXX0X
STDLIB =
ifeq ($(shell uname -s), FreeBSD)
STDLIB += -stdlib=libstdc++
endif
CXXFLAGS += $(STDLIB)
CLIENT_SOURCES = client.cpp \
Utils/Files.cpp \
Utils/Net.cpp \
SERVER_SOURCES = server.cpp \
Utils/Files.cpp \
Utils/Net.cpp \
Connection.cpp \
Acceptor.cpp \
AEvent/AEventAbstract.cpp
CLIENT_EXEC = client
SERVER_EXEC = server
all: $(CLIENT_EXEC) $(SERVER_EXEC)
$(CLIENT_EXEC): $(CLIENT_SOURCES)
$(CXX) $(INCLUDES) $(CXXFLAGS)-o $@ $^ $(LDFLAGS)
$(SERVER_EXEC): $(SERVER_SOURCES)
$(CXX) $(INCLUDES) $(CXXFLAGS)-o $@ $^ $(LDFLAGS)
clean:
rm -f $(CLIENT_EXEC)