forked from OpenLightingProject/ola
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.am
196 lines (160 loc) · 5.42 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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# This is a non-recursive Makefile, see
# https://github.com/OpenLightingProject/ola/issues/397 for links to useful
# documentation.
#
# Rather than defining everything in a single Makefile we include a Makefile.mk
# from each directory. This gives the build rules a bit more structure.
auxdir = @ac_aux_dir@
AUX_DIST = $(auxdir)/install-sh $(auxdir)/missing \
$(auxdir)/mkinstalldirs
# As suggested by libtoolize
ACLOCAL = aclocal -I $(auxdir)
ACLOCAL_AMFLAGS = -I config
include aminclude.am
# When running distcheck we want to enable the Python modules.
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-python-libs
# C++ FLAGS variables
# ------------------------------------------------------------------------------
# COMMON_CXXFLAGS
# The common C++ flags. This may include -Werror if fatal-warning was enabled
# in ./configure. AM_CXXFLAGS defaults to this, and it should be preferred.
#
# COMMON_CXXFLAGS_ONLY_WARNINGS
# The common C++ flags with (non-fatal) warnings enabled. Use this for 3rd
# party code that does not build correctly with COMMON_CXXFLAGS.
#
# COMMON_TESTING_FLAGS
# The common C++ flags for testing.
COMMON_CXXFLAGS_ONLY_WARNINGS = \
-I$(top_srcdir)/include \
-I$(top_builddir)/include \
-Wall -Wformat -W -fvisibility-inlines-hidden \
$(libprotobuf_CFLAGS)
COMMON_CXXFLAGS = $(COMMON_CXXFLAGS_ONLY_WARNINGS)
# The genererated protobuf files don't compile with -Werror on win32 so we
# disable fatal warnings on WIN32.
if ! USING_WIN32
if FATAL_WARNINGS
COMMON_CXXFLAGS += -Werror
endif
endif
# AM_CXXFLAGS is used when target_CXXFLAGS isn't specified.
AM_CXXFLAGS = $(COMMON_CXXFLAGS)
COMMON_TESTING_FLAGS = $(COMMON_CXXFLAGS) $(CPPUNIT_CFLAGS) \
-DTEST_SRC_DIR=\"$(srcdir)\" \
-DTEST_BUILD_DIR=\"$(builddir)\"
# LIBS variables
# ------------------------------------------------------------------------------
#
# COMMON_TESTING_LIBS
# The set of libraries used in the unittests.
COMMON_TESTING_LIBS = $(CPPUNIT_LIBS) \
common/testing/libolatesting.la \
common/testing/libtestmain.la \
common/libolacommon.la
# Due to MinGW's handling of library archives, we need to append this.
if USING_WIN32
COMMON_TESTING_LIBS += $(CPPUNIT_LIBS)
endif
# Setup pkgconfigdir, the path where .pc files are installed.
pkgconfigdir = $(libdir)/pkgconfig
oladincludedir = $(includedir)/olad
# Define a custom runner for .py tests
TESTS_ENVIRONMENT = PYTHONPATH=${top_srcdir}/python
TEST_EXTENSIONS = .py
PY_LOG_COMPILER = $(PYTHON)
# Variables used by the included Makefile.mk(s)
# ------------------------------------------------------------------------------
# Common automake variables.
CLEANFILES =
BUILT_SOURCES =
EXTRA_DIST =
bin_PROGRAMS =
check_PROGRAMS =
noinst_PROGRAMS =
pkgconfig_DATA =
noinst_DATA =
dist_noinst_DATA =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
check_SCRIPTS =
dist_check_SCRIPTS =
dist_noinst_SCRIPTS =
dist_man_MANS =
pkginclude_HEADERS =
noinst_HEADERS =
nodist_pkginclude_HEADERS =
# Append to this to define an install-exec-hook.
INSTALL_EXEC_HOOKS =
# Test programs, these are added to check_PROGRAMS and TESTS if BUILD_TESTS is
# true.
test_programs =
# Files in built_sources are included in BUILT_SOURCES and CLEANFILES
built_sources =
# Test scripts are run if BUILD_TESTS is true.
test_scripts =
# The includes
# -----------------------------------------------------------------------------
# Since `make install` relinks the libraries, this should be in the order in
# which libraries depend on each other. e.g. common, plugin_api, plugins, server.
include common/Makefile.mk
include data/Makefile.mk
include debian/Makefile.mk
include doxygen/Makefile.mk
include examples/Makefile.mk
include include/Makefile.mk
include javascript/Makefile.mk
include man/Makefile.mk
include libs/Makefile.mk
include ola/Makefile.mk
# olad/plugin_api/Makefile.mk is included directly due to the order of
# dependencies between them; we need to build olad/plugin_api, then the
# plugins, then olad
include olad/plugin_api/Makefile.mk
include plugins/Makefile.mk
include olad/Makefile.mk
include protoc/Makefile.mk
include python/Makefile.mk
include tools/Makefile.mk
# -----------------------------------------------------------------------------
# Now some post-processing
BUILT_SOURCES += $(built_sources)
CLEANFILES += $(built_sources)
if BUILD_TESTS
TESTS = $(test_programs) $(test_scripts)
endif
check_PROGRAMS += $(test_programs)
install-exec-hook: $(INSTALL_EXEC_HOOKS)
# -----------------------------------------------------------------------------
# This gives us a rather hacky method to build the files normally built during
# the build, so they are present for Doxygen to run against
builtfiles : Makefile.am $(built_sources)
.PHONY : builtfiles
# I can't figure out how to safely execute a command (mvn) in a subdirectory,
# so this is recursive for now.
SUBDIRS = java
pkgconfig_DATA += libola.pc libolaserver.pc
# dvi is run from make distcheck. Do nothing.
dvi:
EXTRA_DIST += \
CONTRIBUTING \
Doxyfile \
GPL \
LGPL \
LICENCE \
README.debian \
README.developer \
README.mingw32 \
README.rpm \
config/ac_prog_java_cc.m4 \
config/ac_python_devel.m4 \
config/ac_saleae.m4 \
config/ax_python_module.m4 \
config/maven.m4 \
config/ola.m4 \
config/ola_version.m4 \
config/pkg.m4 \
config/resolv.m4 \
config/stl_hash.m4 \
mac_build.sh \
ola.spec