-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
148 lines (136 loc) · 3.45 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
TOOL=randomness-testing-toolkit
CC=gcc
CXX=g++
CXXFLAGS += -std=c++14 -I. -O3 -g
LIBS=-L/usr/lib -L. -lpthread -lboost_regex
# Disable MySQL backend with USE_MYSQL_BACKEND=0
ifeq ($(USE_MYSQL_BACKEND),)
USE_MYSQL_BACKEND=1
endif
ifeq ($(USE_MYSQL_BACKEND),1)
CXXFLAGS += -DUSE_MYSQL_BACKEND=1
LIBS += -lmysqlcppconn
STATIC_LIBS += -lmariadb
endif
# Debian only fixed config for now
STATIC_LIBS += -lssl -lcrypto -lz -lzstd -static
# === Header files ===
# === Source files must be in same dir as corresponding header ===
DEPS = \
libs/cephes/cephes.h \
rtt/constants.h \
rtt/utils.h \
rtt/version.h \
rtt/batteries/dieharder/battery-dh.h \
rtt/batteries/dieharder/test-dh.h \
rtt/batteries/niststs/battery-sts.h \
rtt/batteries/niststs/test-sts.h \
rtt/batteries/dieharder/setting-dh.h \
rtt/batteries/testu01/battery-tu01.h \
rtt/batteries/testu01/test-tu01.h \
rtt/batteries/ibattery-batt.h \
rtt/batteries/itest-batt.h \
rtt/batteries/testrunner-batt.h \
rtt/rttexception.h \
rtt/toolkitsettings.h \
rtt/bugexception.h \
rtt/batteries/configuration-batt.h \
rtt/batteries/testconstants.h \
rtt/globalcontainer.h \
libs/easylogging/easylogging++.h \
rtt/logger.h \
rtt/strings.h \
rtt/batteries/batteryoutput.h \
libs/moderncppjson/json.hpp \
rtt/storage/istorage.h \
rtt/storage/filestorage.h \
rtt/batteries/ivariant-batt.h \
rtt/batteries/niststs/variant-sts.h \
rtt/batteries/dieharder/variant-dh.h \
rtt/batteries/testu01/variant-tu01.h \
rtt/batteries/result/pvalueset-res.h \
rtt/batteries/result/subtestresult-res.h \
rtt/batteries/result/variantresult-res.h \
rtt/storage/mysqlstorage.h \
rtt/batteries/itestresult-batt.h \
rtt/batteries/testu01/testresult-tu01.h \
rtt/batteries/niststs/testresult-sts.h \
rtt/batteries/dieharder/testresult-dh.h \
rtt/batteries/result/statistic-res.h \
libs/variant/include/mpark/variants/config.hpp \
libs/variant/include/mpark/variants/lib.hpp \
libs/variant/include/mpark/in_place.hpp \
libs/variant/include/mpark/variant.hpp \
rtt/clinterface/clargument.h \
rtt/clinterface/batteryarg.h \
rtt/clinterface/resultstoragearg.h \
rtt/clinterface/rttclioptions.h
# === Target object files ===
OBJ = \
cephes.o \
constants.o \
main.o \
utils.o \
battery-dh.o \
test-dh.o \
battery-sts.o \
test-sts.o \
setting-dh.o \
battery-tu01.o \
test-tu01.o \
ibattery-batt.o \
itest-batt.o \
testrunner-batt.o \
toolkitsettings.o \
configuration-batt.o \
testconstants.o \
globalcontainer.o \
logger.o \
strings.o \
batteryoutput.o \
istorage.o \
filestorage.o \
ivariant-batt.o \
variant-sts.o \
variant-dh.o \
variant-tu01.o \
subtestresult-res.o \
variantresult-res.o \
mysqlstorage.o \
itestresult-batt.o \
testresult-dh.o \
testresult-sts.o \
testresult-tu01.o \
statistic-res.o \
batteryarg.o \
resultstoragearg.o \
rttclioptions.o
# === All paths inside project directory ===
# === Ugly but works ===
VPATH = \
rtt:\
rtt/batteries:\
rtt/batteries/dieharder:\
rtt/batteries/niststs:\
rtt/batteries/testu01:\
rtt/batteries/result:\
rtt/clinterface:\
rtt/storage:\
libs:\
libs/cephes:\
libs/easylogging:\
libs/moderncppjson:\
libs/variant:\
libs/variant/include:\
libs/variant/include/mpark:\
libs/variant/include/mpark/variants
%.o: %.cpp $(DEPS)
$(CXX) -c -o $@ $< $(CXXFLAGS)
$(TOOL): $(OBJ)
$(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
$(TOOL).static: $(OBJ)
$(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS) $(STATIC_LIBS)
static: $(TOOL).static
.PHONY: clean
clean:
rm -f *.o $(TOOL) $(TOOL).static