-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
58 lines (41 loc) · 1.01 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
#############################################################
# Setup variable section #
#############################################################
# Compiler
COMPILER=g++
# C++ standard, ex. c++0x, c++11, c++14
CPP_STD= -std=c++11
# Optimization, ex. O3, O2
OPTIMIZATION=
# target name
TARGET=anurandom
# Linker flags variable
LDFLAGS=
# C, C++ flags
CFLAGS=
# source, include path
SRC=
INC=
# boost flags
BOOST= -lboost_system
#debug flag
DBG= -g
# sourcepaths
SRC_PATH=src/
INC_PATH=inc/
##############################################################
# Make file commands section #
##############################################################
if[${CXX?}=""]; then CXX=$(COMPILER); fi;
CFLAGS+= -$(CPP_STD)
CFLAGS+= -Wall
CFLAGS+= $(DBG)
CFLAGS+= $(OPTIMIZATION)
LDFLAGS+=$(BOOST)
LDFLAGS+=-lpthread
INC+=$(INC_PATH)
SRC+=$(shell ls $(SRC_PATH)*.cpp)
all:
$(CXX) $(CFLAGS) -I $(INC) $(SRC) -o $(TARGET) $(LDFLAGS)
clean:
rm -rf $(TARGET) *.o