forked from syslog-ng/syslog-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
226 lines (185 loc) · 6.32 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
#############################################################################
# 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
AM_TESTS_ENVIRONMENT = top_srcdir="$(top_srcdir)"
ACLOCAL_AMFLAGS = -I m4 --install
EXTRA_DIST = ${BUILT_SOURCES} VERSION NEWS.md autogen.sh \
syslog-ng.spec syslog-ng.spec.in \
dist.conf dist.conf.in syslog-ng.pc.in \
CONTRIBUTING.md
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = syslog-ng.pc
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/modules -I$(top_builddir)/lib -I$(top_builddir)/modules
# configure script gives us -g and/or -O2, but all warning related settings
# should be here
# Important warnings
AM_CFLAGS = \
-Wshadow \
-fcommon
# Acceptable warnings
AM_CFLAGS += \
-Wno-stack-protector \
-Wno-unused-parameter \
-Wno-variadic-macros
if ENABLE_EXTRA_WARNINGS
AM_CFLAGS += \
-Wimplicit-function-declaration \
-Wnested-externs \
-Wold-style-declaration \
-Wstrict-prototypes \
-Wswitch-default \
-Wall \
-Wmissing-parameter-type \
-Wuninitialized \
-Wunused-but-set-parameter \
-Wcast-align \
-Wdeprecated \
-Wdeprecated-declarations \
-Woverflow \
-Wdouble-promotion \
-Wfloat-equal
endif
TEST_CFLAGS = -I$(top_srcdir)/libtest -DTOP_SRCDIR=\"$(abs_top_srcdir)\" $(AM_CFLAGS)
TEST_LDADD = $(LIBTEST_LIBS) \
$(top_builddir)/lib/libsyslog-ng.la \
$(TOOL_DEPS_LIBS)
TEST_CFLAGS += $(CRITERION_CFLAGS)
TEST_LDADD += $(CRITERION_LIBS)
test_ldflags = -no-install $(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_LIBRARIES =
noinst_DATA =
noinst_LTLIBRARIES =
lib_LTLIBRARIES =
pkginclude_HEADERS = syslog-ng-config.h
module_LTLIBRARIES =
loggenplugin_LTLIBRARIES =
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)/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 syslog-ng 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-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 Mk/lex-rules.am
include Mk/Makefile.am
if ENABLE_TESTING
include libtest/Makefile.am
endif
include lib/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/debian/Makefile.am
include dbld/Makefile.am
TEST_EXTENSIONS = .sh
@VALGRIND_CHECK_RULES@
VALGRIND_SUPPRESSIONS_FILES = $(top_srcdir)/tests/valgrind/unit-test-leak.supp
EXTRA_DIST += syslog-ng.supp
VALGRIND_FLAGS = \
--num-callers=30 \
--sim-hints=no-nptl-pthread-stackcache \
--gen-suppressions=all
VALGRIND_memcheck_FLAGS = \
--leak-check=full \
--freelist-vol=200''000''000 \
--freelist-big-blocks=10''000''000 \
--malloc-fill=55 \
--free-fill=AA