-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
68 lines (52 loc) · 1.28 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
61
62
63
64
65
66
67
68
# Compiler Options
OS = mingw
SYSTEM = 64
OPTIMIZATION = 0
LANG_FLAGS = -std=c++11 -fstack-protector -g -O$(OPTIMIZATION)
WARN_FLAG = -Wall -Wextra -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual -Wold-style-cast -Wzero-as-null-pointer-constant
LIBS = $(shell botan-config-1.11 --libs)
INCLUDE_DIRS = $(shell botan-config-1.11 --cflags)
ifeq ($(OS), mingw)
CXX = g++
LANG_FLAGS += -D_UNICODE -DUNICODE
LIBS += -lssp -lws2_32 -lmswsock -lwininet -static -static-libgcc -static-libstdc++
else
CXX = clang++
endif
# Version Numbers
VERSION = 0.1.0
BRANCH = 0.1
OBJDIR = build
# Program aliases
AR = ar cr
COPY = cp
COPY_R = cp -r
CD = @cd
ECHO = @echo
LN = ln -fs
MKDIR = @mkdir
RANLIB = ranlib
RM = @rm -f
RM_R = @rm -rf
# Targets
APP = pivotal.exe
all: $(APP)
# File Lists
OBJS = build/request_forwarder_wininet.o \
build/request_parser.o \
build/response.o \
build/server.o \
build/session.o \
build/main_nodll.o
# Build Commands
build/%.o: ./source/%.cpp Makefile
$(CXX) -m$(SYSTEM) $(LANG_FLAGS) $(WARN_FLAGS) $(INCLUDE_DIRS) -c $< -o $@
$(OBJDIR):
$(MKDIR) $(OBJDIR)
$(APP): $(OBJDIR) $(OBJS)
$(CXX) $(LDFLAGS) $(OBJS) $(LIBS) -o $(APP)
# Fake Targets
.PHONY = clean
clean:
$(RM_R) $(OBJDIR)
$(RM) $(APP)