-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tuprules.tup
45 lines (32 loc) · 905 Bytes
/
Tuprules.tup
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
.gitignore
export HOME
ifeq (@(COMPILER),)
CXX = g++
else
CXX = @(COMPILER)
endif
LD = $(CXX)
AR = ar
export EXTRA_CPP_FLAGS
export EXTRA_LD_FLAGS
CPP_FLAGS += -std=c++11
CPP_FLAGS += -Wall -Wextra -Werror
CPP_FLAGS += @(OPTIMALIZATION_FLAG)
CPP_FLAGS += -ftemplate-backtrace-limit=0
CPP_FLAGS += $EXTRA_CPP_FLAGS
LD_FLAGS += $EXTRA_LD_FLAGS
SOURCE_DIR = $(TUP_CWD)/src/util
INCLUDE_DIR = $(TUP_CWD)/include
LIB_DIR = $(TUP_CWD)/lib
LIBS += -lboost_regex
LIBS += -lboost_system
LIBS += -lboost_thread
LIBS += -pthread
INCLUDE_DIRS += -I$(INCLUDE_DIR) -I$(INCLUDE_DIR)/util
LIBS += @(PROFILER_LIBS)
LIB_NAME = libcpp-util.a
LIB_PATH = $(LIB_DIR)/$(LIB_NAME)
!cxx = |> ^ CXX %f^ $(CXX) $(CPP_FLAGS) $(INCLUDE_DIRS) -c %f -o %o |> %B.o
!ar = |> ^ AR %o^ $(AR) crs %o %f |>
!linker = |> ^ LD %o^ $(LD) $(LD_FLAGS) %f $(LIBS) -o %o |>
!unitTest = |> ^ UT %f^ ./%f && touch %o |> %b.output