-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.am
executable file
·111 lines (83 loc) · 2.29 KB
/
Makefile.am
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
ACLOCAL_AMFLAGS = -I build-aux -I build-aux/m4
EXTRA_DIST = $(TESTS)
CC = g++
PYTHON=python3.7
bin_PROGRAMS = \
server \
client
check_PROGRAMS = \
server_test \
client_test
TESTS = $(check_PROGRAMS)
# If configure was run with --debug=true
if DEBUG
AM_CFLAGS = -g3 -O0
AM_CXXFLAGS = -g3 -O0
else
AM_CFLAGS = -O2
AM_CXXFLAGS = -O2
endif
# -------------------------
# Common
# -------------------------
# Common flags used for all targets
common_LDADD = $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
common_CPPFLAGS = \
-I$(top_srcdir)/config
common_SOURCES = \
src/common/system.cpp
# -------------------------
# SERVER
# -------------------------
# $(top_builddir) is automatically populated by autoconf in config.status
serverdir = $(top_builddir)/src/server
server_BIN = $(top_builddir)/src/$(_PROJECT_NAME)d$(EXEEXT)
# List of the sources for the server
server_core_SOURCES = \
$(common_SOURCES) \
src/server/server.cpp
# This is the same as core sources but with main.cpp. This is to avoid
# conflicts with main() when running the test suite
server_SOURCES = \
src/server/main.cpp \
$(server_core_SOURCES)
server_CPPFLAGS = \
$(common_CPPFLAGS)
# Server unit tests
server_test_SOURCES = \
$(server_core_SOURCES) \
test/unit/server/server_tests.cpp
# Comiler flags
server_test_CPPFLAGS = \
-I$(top_srcdir)/src/server/
# Linker flags
server_test_LDADD = \
$(common_LDADD)
# -------------------------
# CLIENT
# -------------------------
# $(top_builddir) is automatically populated by autoconf in config.status
clientdir = $(top_builddir)/src/client
client_BIN = $(top_builddir)/src/$(_PROJECT_NAME)-cli$(EXEEXT)
client_core_SOURCES = \
$(common_SOURCES) \
src/client/client.cpp
client_SOURCES = \
src/client/main.cpp \
$(client_core_SOURCES)
client_CPPFLAGS = \
$(common_CPPFLAGS)
client_test_SOURCES = \
$(client_core_SOURCES) \
test/unit/client/client_tests.cpp
client_test_LDADD = $(common_LDADD)
#---------------------------
# INTEGRATION TESTS
# --------------------------
if FUNCTIONAL_TESTS
PYTEST_OPTS := -v --timeout=550 --timeout_method=thread-p no:logging
PYTHONPATH=`pwd`/contrib/pyskeleton::$$PYTHONPATH
functionaldir = ../test/functional
check-local:
$(PYTHON) $(functionaldir)/testrunner.py
endif