forked from axoflow/axosyslog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
296 lines (248 loc) · 8.22 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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
#############################################################################
# Copyright (c) 2016 Balabit
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# As an additional exemption you are allowed to compile & link against the
# OpenSSL libraries as published by the OpenSSL project. See the file
# COPYING for details.
#
#############################################################################
SUBDIRS =
DIST_SUBDIRS =
AM_MAKEFLAGS = --no-print-directory
AM_YFLAGS = -Wno-yacc -Wno-other -Werror=conflicts-sr -Werror=conflicts-rr -Wcounterexamples
AM_TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)" CRITERION_TEST_PATTERN='!(*/*performance*)' ASAN_OPTIONS="detect_odr_violation=0"
if ENABLE_SANITIZER
LOG_COMPILER = $(top_srcdir)/scripts/test-grep.sh
endif
ACLOCAL_AMFLAGS = -I autotools/m4 --install
EXTRA_DIST = $(filter-out ${NODIST_BUILT_SOURCES},${BUILT_SOURCES}) VERSION.txt NEWS.md autogen.sh \
autotools/dist.conf autotools/dist.conf.in autotools/syslog-ng.pc.in \
cmake/syslog-ng-config.h.in \
CONTRIBUTING.md \
autotools/sub-configure.sh \
cmake/syslog-ng.pc.cmake \
cmake/syslog-ng-native-connector.pc.cmake \
syslog-ng-ctl/CMakeLists.txt \
requirements.txt \
dev-requirements.txt \
optional-dev-requirements.txt \
README.md \
.astylerc
pkgdatadir = $(datadir)/syslog-ng
pkgincludedir = $(includedir)/syslog-ng
pkglibdir = $(libdir)/syslog-ng
pkglibexecdir = $(libexecdir)/syslog-ng
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = autotools/syslog-ng.pc
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/modules -I$(top_builddir)/lib -I$(top_builddir)/modules
AM_OBJCFLAGS = -fobjc-arc
# configure script gives us -g and/or -O2, but all warning related settings
# should be here
# Important warnings
AM_CFLAGS = \
-Wshadow
AM_CXXFLAGS = \
-Wshadow
# Acceptable warnings
AM_CFLAGS += \
-Wno-stack-protector \
-Wno-unused-parameter \
-Wno-variadic-macros
AM_CXXFLAGS += \
-Wno-stack-protector \
-Wno-unused-parameter \
-Wno-variadic-macros
if ENABLE_EXTRA_WARNINGS
AM_CFLAGS += \
-Wimplicit-function-declaration \
$(CFLAGS_W_NO_INITIALIZER_OVERRIDES) \
$(CFLAGS_W_OLD_STYLE_DECLARATION) \
-Wnested-externs \
-Wstrict-prototypes \
-Wswitch-default \
-Wimplicit-int \
-Wall \
-Wuninitialized \
-Wunused-but-set-parameter \
-Wdeprecated \
-Wdeprecated-declarations \
-Woverflow \
-Wdouble-promotion \
-Wfloat-equal \
-Wpointer-arith \
-Wpointer-sign \
-Wmissing-format-attribute \
-Wold-style-definition \
-Wundef \
-Wignored-qualifiers \
-Woverride-init \
-Wfloat-conversion \
-Wbad-function-cast
AM_CXXFLAGS += \
-Wswitch-default \
-Wall \
-Wuninitialized \
-Wdeprecated \
-Wdeprecated-declarations \
-Woverflow \
-Wdouble-promotion \
-Wfloat-equal \
-Wpointer-arith \
-Wmissing-format-attribute \
-Wundef \
-Wignored-qualifiers \
-Wfloat-conversion \
-Wunused-but-set-parameter
endif
if ENABLE_DEBUG
AM_CFLAGS += -DYYDEBUG=1
endif
TEST_CFLAGS = -DTOP_SRCDIR=\"$(abs_top_srcdir)\" $(AM_CFLAGS) $(CRITERION_CFLAGS)
TEST_CXXFLAGS = -DTOP_SRCDIR=\"$(abs_top_srcdir)\" $(AM_CXXFLAGS) $(CRITERION_CFLAGS)
TEST_LDADD = $(LIBTEST_LIBS) $(CRITERION_LIBS) \
$(top_builddir)/lib/libsyslog-ng.la \
$(TOOL_DEPS_LIBS)
test_ldflags = $(TEST_NO_INSTALL_FLAG) $(NO_PIE_LDFLAG)
PREOPEN_SYSLOGFORMAT = -dlpreopen ${top_builddir}/modules/syslogformat/libsyslogformat.la
PREOPEN_BASICFUNCS = -dlpreopen ${top_builddir}/modules/basicfuncs/libbasicfuncs.la
PREOPEN_CORE = $(PREOPEN_SYSLOGFORMAT) $(PREOPEN_BASICFUNCS)
syslog_ng_tools = ${top_srcdir}/lib
export top_srcdir
export MAKE
CLEAN_SUBDIRS =
clean-local: ${CLEAN_HOOKS}
${AM_v_at}for dir in ${CLEAN_SUBDIRS}; do \
[ -f $${dir}/Makefile ] && ${MAKE} -C $${dir} clean || true; \
done
distclean-local: distclean-ax-prefix-config-h
distclean-ax-prefix-config-h:
rm -f _configs.sed syslog-ng-config.h
if ENABLE_TESTING
local-check: subdir_tests=$(foreach ts,${${check_subdir}_test_subdirs},${${ts}_tests_TESTS})
local-check: current_tests=$(foreach subdir,${check_subdir} ${check_subdir}_tests,${${subdir}_TESTS})
local-check:
${AM_v_at}${MAKE} check check_PROGRAMS="${current_tests} ${subdir_tests}" \
TESTS="${current_tests} ${subdir_tests}"
endif
check: check_target_guard
check_target_guard:
if !ENABLE_TESTING
$(error "Unit tests disabled")
endif
${check_PROGRAMS}: LDFLAGS+=${test_ldflags}
noinst_PROGRAMS =
noinst_LIBRARIES =
noinst_DATA =
noinst_LTLIBRARIES =
lib_LTLIBRARIES =
pkginclude_HEADERS = syslog-ng-config.h
module_LTLIBRARIES =
loggenplugin_LTLIBRARIES =
BUILT_SOURCES =
NODIST_BUILT_SOURCES =
CLEANFILES = $(BUILT_SOURCES)
check_PROGRAMS =
check_SCRIPTS =
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
bin_SCRIPTS =
dist_sbin_SCRIPTS =
bin_PROGRAMS =
sbin_PROGRAMS =
libexec_PROGRAMS =
man_MANS =
INSTALL_EXEC_HOOKS =
UNINSTALL_HOOKS =
CLEAN_HOOKS =
AUTOMAKE_OPTIONS = subdir-objects parallel-tests
${top_srcdir}/ChangeLog:
(cd $(top_srcdir); git log) > $@
install-exec-hook: ${INSTALL_EXEC_HOOKS}
uninstall-hook: ${UNINSTALL_HOOKS}
populate-makefiles:
$(top_srcdir)/autotools/Mk/populate-makefiles.sh
style-check:
$(top_srcdir)/scripts/style-checker.sh check $(top_srcdir)
style-format:
$(top_srcdir)/scripts/style-checker.sh format $(top_srcdir)
help:
@echo "Welcome to the AxoSyslog build system!"
@echo
@echo "All of the standard targets are available:"
@echo " all, check, install, dist, distcheck, and clean"
@echo
@echo "Apart from these, the build system supports various other,"
@echo "special targets:"
@echo
@echo " modules Builds all syslog-ng modules."
@echo " syslog-ng Build syslog-ng itself, only."
@echo " populate-makefiles populate build directory with stub Makefiles"
@echo " check-commits check commits format"
@echo " check-copyright check copyright/license statements in files"
@echo " style-check check formatting of source files (astyle)"
@echo " style-format reformat source files (astyle)"
@echo
@echo "One can also build individual modules (and their dependencies),"
@echo "using any of the following shortcuts:"
@echo
@echo "" ${SYSLOG_NG_MODULES} | sed -e 's#\(.\{,72\}\) #\1\n #g'
.PHONY: help populate-makefiles
install_moduleLTLIBRARIES = install-moduleLTLIBRARIES
$(install_moduleLTLIBRARIES): install-libLTLIBRARIES
install_loggenpluginLTLIBRARIES = install-loggenpluginLTLIBRARIES
$(install_loggenpluginLTLIBRARIES): install-libLTLIBRARIES
include autotools/Mk/lex-rules.am
include autotools/Mk/python-venv.am
include autotools/Mk/Makefile.am
if ENABLE_TESTING
include libtest/Makefile.am
endif
include lib/Makefile.am
include charts/Makefile.am
include docker/Makefile.am
include modules/Makefile.am
include syslog-ng/Makefile.am
include syslog-ng-ctl/Makefile.am
include scripts/Makefile.am
include tests/Makefile.am
include doc/Makefile.am
include contrib/Makefile.am
include scl/Makefile.am
include packaging/Makefile.am
include dbld/Makefile.am
include cmake/Makefile.am
include persist-tool/Makefile.am
TEST_EXTENSIONS = .sh
@VALGRIND_CHECK_RULES@
VALGRIND_SUPPRESSIONS_FILES = $(top_srcdir)/tests/valgrind/unit-test-leak.supp
EXTRA_DIST += \
.github/ISSUE_TEMPLATE/10-bug-report.md \
.github/ISSUE_TEMPLATE/20-documentation-issue.md \
.github/ISSUE_TEMPLATE/30-feature-request.md \
GPL.txt \
LGPL.txt \
CMakeLists.txt
VALGRIND_FLAGS = \
--num-callers=30 \
--sim-hints=no-nptl-pthread-stackcache \
--gen-suppressions=all
VALGRIND_memcheck_FLAGS = \
--leak-check=full \
--trace-children=yes \
--freelist-vol=200''000''000 \
--freelist-big-blocks=10''000''000 \
--malloc-fill=55 \
--free-fill=AA