-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (45 loc) · 1.4 KB
/
Copy pathMakefile
File metadata and controls
64 lines (45 loc) · 1.4 KB
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
61
62
63
CXX:=$(shell sh -c 'type $(CXX) >/dev/null 2>/dev/null && echo $(CXX) || echo g++')
OPTIMIZATION = -O0
WARNINGS = \
-Wall \
-Wno-sign-compare \
-Wno-deprecated-register \
-Wno-unused-function
DEBUG =-g
STDC = -std=c++1y
LDFLAGS = -lstdc++ -pthread
INCLUDES =
ASIO_STANDALONE_FLAG = -DASIO_STANDALONE
CXXFLAGS = $(OPTIMIZATION) -fPIC -fstack-protector $(CFLAGS) $(WARNINGS) $(DEBUG) $(STDC) -DUSE_CXX0X
STDLIB =
ifeq ($(shell uname -s), FreeBSD)
STDLIB += -stdlib=libc++
LIBXML_INCLUDES =
LIBXML_INCLUDES = -I/usr/local/include/libxml2
FREEBSD_ASIO_INCLUDE ?= -I/raspberry/asio/product/include
INCLUDES += $(FREEBSD_ASIO_INCLUDE)
endif
CXXFLAGS += $(STDLIB)
CFLAGS=-c -Wall
SOURCES = cdnsd.cpp \
ServerCore/Controller.cpp \
ServerCore/Workers.cpp \
ServerCore/Acceptors.cpp \
ServerCore/DnsBuffer.cpp \
ServerCore/DnsUtils.cpp \
Config/GlobalConf.cpp \
Logger/Logger.cpp \
AsyncEvent/AEvBase/AEventAbstract.cpp \
AsyncEvent/BufferBase/BuffAbstract.cpp \
AsyncEvent/SysSig/AEvSysSig.cpp \
HUtils/HStrings.cpp \
HUtils/HNet.cpp
EXECUTABLE = cdnsd-bin
OBJECTS=$(SOURCES:.cpp=.o)
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) -o $@
.cpp.o:
$(CXX) $(ASIO_STANDALONE_FLAG) $(INCLUDES) $(CXXFLAGS) $< -o $@
clean:
rm -f $(OBJECTS) $(EXECUTABLE) $(TESTING_OBJ) $(TESTING_EXEC)