-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.inc
49 lines (33 loc) · 932 Bytes
/
common.inc
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
#BOOST_INCLUDE := -I/home/jselbie/boost_1_72_0
#OPENSSL_INCLUDE := -I/Users/jselbie/openssl/include
DEFINES := -DNDEBUG
# CLANG compiler works fine
# CXX := /usr/bin/clang++
STANDARD_FLAGS := -Wall -Wuninitialized
RELEASE_FLAGS := -O2
DEBUG_FLAGS := -g
PROFILE_FLAGS := -O2 -g
FLAVOR_FLAGS = $(RELEASE_FLAGS)
CRYPTO_LIBS := -lcrypto
#SOLARIS HACK
UNAME := $(shell uname -s)
ifeq ($(UNAME),SunOS)
SOCKET_LIBS := -lsocket -lnsl
endif
#Mac hack
ifeq ($(UNAME),Darwin)
CRYPTO_LIBS :=
endif
.PHONY: all clean debug
%.hpp.gch: %.hpp
echo Building precompiled header: $@
$(COMPILE.cpp) $(INCLUDES) $(DEFINES) $(STANDARD_FLAGS) $(FLAVOR_FLAGS) $^
%.o: %.cpp
$(COMPILE.cpp) $(INCLUDES) $(DEFINES) $(STANDARD_FLAGS) $(FLAVOR_FLAGS) $^
# put "all" target first so that it is the default
all:
debug: FLAVOR_FLAGS = $(DEBUG_FLAGS)
debug: DEFINES = -DDEBUG
debug: all
profile: FLAVOR_FLAGS = $(PROFILE_FLAGS)
profile: all