]> git.ipfire.org Git - people/stevee/network.git/blame - Makefile.am
Disable async logging
[people/stevee/network.git] / Makefile.am
CommitLineData
5ca9dc30
MT
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2012-2013 IPFire Network Development Team #
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22AM_MAKEFLAGS = --no-print-directory
23AUTOMAKE_OPTIONS = color-tests
24
25# remove target it the command fails
26.DELETE_ON_ERROR:
27
28# keep itermediate files
29.SECONDARY:
30
bae37360 31bashcompletiondir= $(datadir)/bash-completion/completions
5ca9dc30
MT
32libexecdir = $(prefix)/lib
33pkgconfigdatadir = $(datadir)/pkgconfig
34pppdir = $(sysconfdir)/ppp
35sysctldir = $(prefix)/lib/sysctl.d
36tmpfilesdir = $(prefix)/lib/tmpfiles.d
37udevrulesdir = $(udevdir)/rules.d
38
39networkdir = $(libexecdir)/network
40helpersdir = $(networkdir)/helpers
41
42macrosdir = $(libexecdir)/firewall/macros
43
44hooksdir = $(networkdir)/hooks
7d2cb6d3 45hooks_configsdir = $(hooksdir)/configs
5ca9dc30
MT
46hooks_portsdir = $(hooksdir)/ports
47hooks_zonesdir = $(hooksdir)/zones
48
49CLEANFILES =
50DISTCLEANFILES =
51EXTRA_DIST =
52INSTALL_DIRS =
53INSTALL_EXEC_HOOKS =
54UNINSTALL_EXEC_HOOKS =
55noinst_DATA =
56
57DISTCHECK_CONFIGURE_FLAGS = \
58 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
59 --with-udevdir=$$dc_install_base/$(udevdir)
60
61install-directories-hook:
62 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
63
64INSTALL_EXEC_HOOKS += \
65 install-directories-hook
66
67# ------------------------------------------------------------------------------
68
69AM_V_XSLT = $(AM_V_XSLT_$(V))
70AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
71AM_V_XSLT_0 = @echo " XSLT " $@;
72
73# ------------------------------------------------------------------------------
74
75dist_doc_DATA = \
9b325e24 76 COPYING \
5ca9dc30
MT
77 README
78
79dist_sbin_SCRIPTS = \
80 src/dhclient-script \
81 src/firewall-config \
82 src/firewall4 \
83 src/firewall6 \
84 src/network
85
86network_SCRIPTS = \
87 src/functions/functions
88
89CLEANFILES += \
90 src/functions/functions
91
92EXTRA_DIST += \
93 src/functions/functions.in
94
95dist_network_SCRIPTS = \
96 src/functions/functions.aiccu \
97 src/functions/functions.at \
98 src/functions/functions.auth \
99 src/functions/functions.batman-adv \
100 src/functions/functions.bonding \
101 src/functions/functions.bridge \
102 src/functions/functions.cli \
103 src/functions/functions.cli.firewall \
104 src/functions/functions.colors \
105 src/functions/functions.config \
106 src/functions/functions.conntrack \
107 src/functions/functions.constants \
108 src/functions/functions.constants-firewall \
109 src/functions/functions.db \
110 src/functions/functions.device \
111 src/functions/functions.dhclient \
112 src/functions/functions.dhcpd \
113 src/functions/functions.distro \
114 src/functions/functions.dns \
115 src/functions/functions.dummy \
116 src/functions/functions.ethernet \
117 src/functions/functions.firewall \
118 src/functions/functions.firewall-policy \
119 src/functions/functions.firewall-zones \
120 src/functions/functions.he \
121 src/functions/functions.hook \
122 src/functions/functions.hostapd \
b8026986 123 src/functions/functions.hotplug \
5ca9dc30
MT
124 src/functions/functions.http \
125 src/functions/functions.ip \
126 src/functions/functions.iptables \
127 src/functions/functions.ip-tunnel \
128 src/functions/functions.ipv4 \
129 src/functions/functions.ipv6 \
5ca9dc30
MT
130 src/functions/functions.list \
131 src/functions/functions.lock \
132 src/functions/functions.logging \
133 src/functions/functions.macros \
5ca9dc30
MT
134 src/functions/functions.modem \
135 src/functions/functions.phy \
136 src/functions/functions.ports \
137 src/functions/functions.ppp \
138 src/functions/functions.pppoe-server \
139 src/functions/functions.radvd \
140 src/functions/functions.red \
141 src/functions/functions.route \
142 src/functions/functions.routing \
143 src/functions/functions.serial \
144 src/functions/functions.service \
e9df08ad 145 src/functions/functions.settings \
5ca9dc30 146 src/functions/functions.stp \
5ca9dc30 147 src/functions/functions.sysctl \
5ca9dc30
MT
148 src/functions/functions.usb \
149 src/functions/functions.util \
150 src/functions/functions.vlan \
151 src/functions/functions.wireless \
152 src/functions/functions.wpa_supplicant \
153 src/functions/functions.zone \
154 src/network-radvd-config \
155 src/dhclient-helper \
156 src/header-config \
157 src/header-port \
158 src/header-zone \
159 src/ppp/dialer \
160 src/ppp/pppoe-server
161
162dist_helpers_SCRIPTS = \
163 src/helpers/aiccu-config-helper \
164 src/helpers/bridge-stp \
165 src/helpers/dhcpd-config-helper \
166 src/helpers/firewall-kernel-init \
167 src/helpers/hostapd-config-helper \
5ca9dc30
MT
168 src/helpers/pppd-angel \
169 src/helpers/wpa_supplicant \
170 src/helpers/wpa_supplicant-config-helper
171
d837cc79 172bridge-stp-install-hook: bridge-stp-uninstall-hook
5ca9dc30
MT
173 ln -svf --relative $(DESTDIR)$(helpersdir)/bridge-stp $(DESTDIR)$(sbindir)/
174
175bridge-stp-uninstall-hook:
176 rm -f $(DESTDIR)$(sbindir)/bridge-stp
177
178INSTALL_EXEC_HOOKS += bridge-stp-install-hook
179UNINSTALL_EXEC_HOOKS += bridge-stp-uninstall-hook
180
7d2cb6d3
MT
181dist_hooks_configs_SCRIPTS = \
182 src/hooks/configs/ipv4-dhcp \
7d2cb6d3 183 src/hooks/configs/ipv4-static \
b73e9d43
MT
184 src/hooks/configs/ipv6-auto \
185 src/hooks/configs/ipv6-static \
7d2cb6d3
MT
186 src/hooks/configs/pppoe-server
187
5ca9dc30
MT
188dist_hooks_ports_SCRIPTS = \
189 src/hooks/ports/batman-adv \
5ca9dc30
MT
190 src/hooks/ports/bonding \
191 src/hooks/ports/dummy \
192 src/hooks/ports/ethernet \
5ca9dc30 193 src/hooks/ports/vlan \
b8026986 194 src/hooks/ports/wireless-adhoc \
5ca9dc30
MT
195 src/hooks/ports/wireless-ap
196
197dist_hooks_zones_SCRIPTS = \
198 src/hooks/zones/6rd \
199 src/hooks/zones/6to4-tunnel \
200 src/hooks/zones/aiccu \
5ca9dc30 201 src/hooks/zones/bridge \
5ca9dc30
MT
202 src/hooks/zones/modem \
203 src/hooks/zones/pppoe \
5ca9dc30
MT
204 src/hooks/zones/wireless
205
206# ------------------------------------------------------------------------------
207
208ppp_SCRIPTS = \
209 src/ppp/ip-updown
210
211CLEANFILES += \
212 src/ppp/ip-updown
213
214EXTRA_DIST += \
215 src/ppp/ip-updown.in
216
217INSTALL_DIRS += \
218 $(pppdir)
219
220ppp-install-hook:
221 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
222 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
223 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
224 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
225 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
226
227ppp-uninstall-hook:
228 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
229 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
230
231INSTALL_EXEC_HOOKS += ppp-install-hook
232UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
233
234# ------------------------------------------------------------------------------
235
236if HAVE_SYSTEMD
237systemdsystemunit_DATA = \
238 src/systemd/firewall4.service \
239 src/systemd/firewall6.service \
240 src/systemd/firewall-init.service \
241 src/systemd/network-init.service \
242 src/systemd/network@.service
243
244CLEANFILES += \
245 $(systemdsystemunit_DATA)
246
247INSTALL_DIRS += \
248 $(systemdsystemunitdir)
249endif
250
251EXTRA_DIST += \
252 src/systemd/firewall4.service.in \
253 src/systemd/firewall6.service.in \
254 src/systemd/firewall-init.service.in \
255 src/systemd/network-init.service.in \
256 src/systemd/network@.service.in
257
258# ------------------------------------------------------------------------------
259
260dist_sysctl_DATA = \
261 src/sysctl/network.conf
262
263# ------------------------------------------------------------------------------
264
bae37360
MT
265dist_bashcompletion_SCRIPTS = \
266 src/bash-completion/network
267
268# ------------------------------------------------------------------------------
269
5ca9dc30
MT
270dist_tmpfiles_DATA = \
271 src/tmpfiles/network
272
273# ------------------------------------------------------------------------------
274
275if HAVE_UDEV
276dist_udev_SCRIPTS = \
277 src/udev/network-hotplug \
278 src/udev/network-hotplug-rename \
279 src/udev/network-hotplug-serial
280
281dist_udevrules_DATA = \
282 src/udev/rules.d/50-serial-whitelist.rules \
283 src/udev/rules.d/60-net.rules
284
285INSTALL_DIRS += \
286 $(udevdir) \
287 $(udevrulesdir)
288endif
289
290# ------------------------------------------------------------------------------
291
292pkgconfigdata_DATA = \
293 src/network.pc
294
295CLEANFILES += \
296 $(pkgconfigdata_DATA)
297
298EXTRA_DIST += \
299 src/network.pc.in
300
301# ------------------------------------------------------------------------------
302
303dist_macros_DATA = \
304 src/macros/DHCP \
305 src/macros/HTTP \
306 src/macros/HTTPS \
307 src/macros/WWW
308
309# ------------------------------------------------------------------------------
310
311MANPAGES = \
2b0ff832 312 man/firewall-settings.8 \
5ca9dc30 313 man/network.8 \
5ca9dc30
MT
314 man/network-device.8 \
315 man/network-dns-server.8 \
316 man/network-port-batman-adv.8 \
317 man/network-port-batman-adv-port.8 \
318 man/network-route.8 \
2b0ff832 319 man/network-settings.8 \
5ca9dc30
MT
320 man/network-zone.8 \
321 man/network-zone-6rd.8 \
322 man/network-zone-6to4-tunnel.8 \
323 man/network-zone-aiccu.8 \
324 man/network-zone-bridge.8 \
325 man/network-zone-config-pppoe-server.8 \
5fb7b17d 326 man/network-zone-pppoe.8
5ca9dc30
MT
327
328MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
329MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
330
331.PHONY: man
332man: $(MANPAGES) $(MANPAGES_HTML)
333
334man_MANS = \
335 $(MANPAGES)
336
337noinst_DATA += \
338 $(MANPAGES_HTML)
339
340CLEANFILES += \
341 $(man_MANS) \
342 $(MANPAGES_HTML)
343
344EXTRA_DIST += \
345 $(MANPAGES_XML) \
346 man/custom-html.xsl
347
348XSLTPROC_FLAGS = \
349 --nonet \
350 --stringparam man.output.quietly 1 \
351 --stringparam funcsynopsis.style ansi \
352 --stringparam man.th.extra1.suppress 1 \
353 --stringparam man.authors.section.enabled 1 \
354 --stringparam man.copyright.section.enabled 1
355
356XSLTPROC_COMMAND_MAN = \
357 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
358 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
359
360XSLTPROC_COMMAND_HTML = \
361 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
362
363man/%.8: man/%.xml
364 $(XSLTPROC_COMMAND_MAN)
365
366man/%.html: man/%.xml man/custom-html.xsl
367 $(XSLTPROC_COMMAND_HTML)
368
369# ------------------------------------------------------------------------------
370
371substitutions = \
372 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
373 '|PACKAGE_URL=$(PACKAGE_URL)|' \
374 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
375 '|prefix=$(prefix)|' \
376 '|exec_prefix=$(exec_prefix)|' \
377 '|sbindir=$(sbindir)|' \
c6525a63
MT
378 '|networkdir=$(networkdir)|' \
379 '|helpersdir=$(helpersdir)|'
5ca9dc30
MT
380
381SED_PROCESS = \
382 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
383 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
384 < $< > $@
385
386src/functions/functions: src/functions/functions.in Makefile
387 $(SED_PROCESS)
388
389src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
390 $(SED_PROCESS)
391
392src/systemd/%: src/systemd/%.in Makefile
393 $(SED_PROCESS)
394
395src/%.pc: src/%.pc.in Makefile
396 $(SED_PROCESS)
397
398INSTALL_DIRS += \
399 $(sbindir)
400
401install-exec-hook: $(INSTALL_EXEC_HOOKS)
402
403uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
404
405# - testsuite ------------------------------------------------------------------
406
407TESTS_ENVIRONMENT = \
408 topdir="$(shell pwd)" \
409 networkdir="$(top_srcdir)/src/functions"
410
411dist_check_SCRIPTS = \
412 test/load-library
413
414TESTS = \
415 test/load-library