]> git.ipfire.org Git - people/ms/network.git/blame - Makefile.am
device queues: Fix listing queues
[people/ms/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
de3cecef
MT
49triggersdir = $(networkdir)/triggers
50
9c9d0585
SS
51logdir = $(localestatedir)/log/network
52
5ca9dc30
MT
53CLEANFILES =
54DISTCLEANFILES =
55EXTRA_DIST =
56INSTALL_DIRS =
57INSTALL_EXEC_HOOKS =
58UNINSTALL_EXEC_HOOKS =
59noinst_DATA =
60
e708653f
SS
61AM_CFLAGS = $(OUR_CFLAGS)
62AM_CPPFLAGS = $(OUR_CPPFLAGS)
63AM_LDFLAGS = $(OUR_LDFLAGS)
64
5ca9dc30
MT
65DISTCHECK_CONFIGURE_FLAGS = \
66 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
67 --with-udevdir=$$dc_install_base/$(udevdir)
68
69install-directories-hook:
70 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
71
72INSTALL_EXEC_HOOKS += \
73 install-directories-hook
74
75# ------------------------------------------------------------------------------
76
77AM_V_XSLT = $(AM_V_XSLT_$(V))
78AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
79AM_V_XSLT_0 = @echo " XSLT " $@;
80
81# ------------------------------------------------------------------------------
82
83dist_doc_DATA = \
9b325e24 84 COPYING \
5ca9dc30
MT
85 README
86
87dist_sbin_SCRIPTS = \
88 src/dhclient-script \
89 src/firewall-config \
90 src/firewall4 \
91 src/firewall6 \
92 src/network
93
94network_SCRIPTS = \
95 src/functions/functions
96
97CLEANFILES += \
98 src/functions/functions
99
100EXTRA_DIST += \
101 src/functions/functions.in
102
103dist_network_SCRIPTS = \
5ca9dc30
MT
104 src/functions/functions.at \
105 src/functions/functions.auth \
106 src/functions/functions.batman-adv \
107 src/functions/functions.bonding \
108 src/functions/functions.bridge \
109 src/functions/functions.cli \
110 src/functions/functions.cli.firewall \
111 src/functions/functions.colors \
112 src/functions/functions.config \
113 src/functions/functions.conntrack \
114 src/functions/functions.constants \
115 src/functions/functions.constants-firewall \
116 src/functions/functions.db \
117 src/functions/functions.device \
118 src/functions/functions.dhclient \
119 src/functions/functions.dhcpd \
120 src/functions/functions.distro \
121 src/functions/functions.dns \
122 src/functions/functions.dummy \
123 src/functions/functions.ethernet \
124 src/functions/functions.firewall \
125 src/functions/functions.firewall-policy \
126 src/functions/functions.firewall-zones \
127 src/functions/functions.he \
128 src/functions/functions.hook \
129 src/functions/functions.hostapd \
b8026986 130 src/functions/functions.hotplug \
5ca9dc30 131 src/functions/functions.http \
de72bd91 132 src/functions/functions.interrupts \
5ca9dc30
MT
133 src/functions/functions.ip \
134 src/functions/functions.iptables \
135 src/functions/functions.ip-tunnel \
136 src/functions/functions.ipv4 \
137 src/functions/functions.ipv6 \
5ca9dc30
MT
138 src/functions/functions.list \
139 src/functions/functions.lock \
140 src/functions/functions.logging \
141 src/functions/functions.macros \
5ca9dc30
MT
142 src/functions/functions.modem \
143 src/functions/functions.phy \
144 src/functions/functions.ports \
145 src/functions/functions.ppp \
146 src/functions/functions.pppoe-server \
147 src/functions/functions.radvd \
148 src/functions/functions.red \
149 src/functions/functions.route \
150 src/functions/functions.routing \
151 src/functions/functions.serial \
152 src/functions/functions.service \
e9df08ad 153 src/functions/functions.settings \
5ca9dc30 154 src/functions/functions.stp \
5ca9dc30 155 src/functions/functions.sysctl \
de72bd91 156 src/functions/functions.system \
de3cecef 157 src/functions/functions.triggers \
5ca9dc30
MT
158 src/functions/functions.usb \
159 src/functions/functions.util \
160 src/functions/functions.vlan \
161 src/functions/functions.wireless \
162 src/functions/functions.wpa_supplicant \
163 src/functions/functions.zone \
164 src/network-radvd-config \
165 src/dhclient-helper \
166 src/header-config \
167 src/header-port \
168 src/header-zone \
169 src/ppp/dialer \
170 src/ppp/pppoe-server
171
172dist_helpers_SCRIPTS = \
5ca9dc30
MT
173 src/helpers/bridge-stp \
174 src/helpers/dhcpd-config-helper \
175 src/helpers/firewall-kernel-init \
176 src/helpers/hostapd-config-helper \
5ca9dc30
MT
177 src/helpers/pppd-angel \
178 src/helpers/wpa_supplicant \
179 src/helpers/wpa_supplicant-config-helper
180
13a6e69f
MT
181bin_PROGRAMS = \
182 src/inetcalc
183
184src_inetcalc_SOURCES = \
185 src/inetcalc.c
186
d837cc79 187bridge-stp-install-hook: bridge-stp-uninstall-hook
5ca9dc30
MT
188 ln -svf --relative $(DESTDIR)$(helpersdir)/bridge-stp $(DESTDIR)$(sbindir)/
189
190bridge-stp-uninstall-hook:
191 rm -f $(DESTDIR)$(sbindir)/bridge-stp
192
193INSTALL_EXEC_HOOKS += bridge-stp-install-hook
194UNINSTALL_EXEC_HOOKS += bridge-stp-uninstall-hook
195
7d2cb6d3
MT
196dist_hooks_configs_SCRIPTS = \
197 src/hooks/configs/ipv4-dhcp \
7d2cb6d3 198 src/hooks/configs/ipv4-static \
b73e9d43 199 src/hooks/configs/ipv6-auto \
7ad5252c 200 src/hooks/configs/ipv6-dhcp \
b73e9d43 201 src/hooks/configs/ipv6-static \
7d2cb6d3
MT
202 src/hooks/configs/pppoe-server
203
5ca9dc30
MT
204dist_hooks_ports_SCRIPTS = \
205 src/hooks/ports/batman-adv \
5ca9dc30
MT
206 src/hooks/ports/bonding \
207 src/hooks/ports/dummy \
208 src/hooks/ports/ethernet \
5ca9dc30 209 src/hooks/ports/vlan \
b8026986 210 src/hooks/ports/wireless-adhoc \
5ca9dc30
MT
211 src/hooks/ports/wireless-ap
212
213dist_hooks_zones_SCRIPTS = \
5ca9dc30 214 src/hooks/zones/6to4-tunnel \
5ca9dc30 215 src/hooks/zones/bridge \
5ca9dc30
MT
216 src/hooks/zones/modem \
217 src/hooks/zones/pppoe \
5ca9dc30
MT
218 src/hooks/zones/wireless
219
220# ------------------------------------------------------------------------------
221
222ppp_SCRIPTS = \
223 src/ppp/ip-updown
224
225CLEANFILES += \
226 src/ppp/ip-updown
227
228EXTRA_DIST += \
229 src/ppp/ip-updown.in
230
231INSTALL_DIRS += \
9c9d0585
SS
232 $(pppdir) \
233 $(logdir)
5ca9dc30
MT
234
235ppp-install-hook:
236 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
237 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
238 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
239 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
240 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
241
242ppp-uninstall-hook:
243 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
244 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
245
246INSTALL_EXEC_HOOKS += ppp-install-hook
247UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
248
249# ------------------------------------------------------------------------------
250
251if HAVE_SYSTEMD
252systemdsystemunit_DATA = \
253 src/systemd/firewall4.service \
254 src/systemd/firewall6.service \
255 src/systemd/firewall-init.service \
256 src/systemd/network-init.service \
257 src/systemd/network@.service
258
259CLEANFILES += \
260 $(systemdsystemunit_DATA)
261
262INSTALL_DIRS += \
263 $(systemdsystemunitdir)
264endif
265
266EXTRA_DIST += \
267 src/systemd/firewall4.service.in \
268 src/systemd/firewall6.service.in \
269 src/systemd/firewall-init.service.in \
270 src/systemd/network-init.service.in \
271 src/systemd/network@.service.in
272
273# ------------------------------------------------------------------------------
274
275dist_sysctl_DATA = \
276 src/sysctl/network.conf
277
278# ------------------------------------------------------------------------------
279
bae37360
MT
280dist_bashcompletion_SCRIPTS = \
281 src/bash-completion/network
282
283# ------------------------------------------------------------------------------
284
5ca9dc30 285dist_tmpfiles_DATA = \
f9dac5a0 286 src/tmpfiles/network.conf
5ca9dc30
MT
287
288# ------------------------------------------------------------------------------
289
290if HAVE_UDEV
291dist_udev_SCRIPTS = \
292 src/udev/network-hotplug \
293 src/udev/network-hotplug-rename \
294 src/udev/network-hotplug-serial
295
296dist_udevrules_DATA = \
297 src/udev/rules.d/50-serial-whitelist.rules \
298 src/udev/rules.d/60-net.rules
299
300INSTALL_DIRS += \
301 $(udevdir) \
302 $(udevrulesdir)
303endif
304
305# ------------------------------------------------------------------------------
306
307pkgconfigdata_DATA = \
308 src/network.pc
309
310CLEANFILES += \
311 $(pkgconfigdata_DATA)
312
313EXTRA_DIST += \
314 src/network.pc.in
315
316# ------------------------------------------------------------------------------
317
318dist_macros_DATA = \
319 src/macros/DHCP \
320 src/macros/HTTP \
321 src/macros/HTTPS \
322 src/macros/WWW
323
324# ------------------------------------------------------------------------------
325
ec3fe5b7 326INSTALL_DIRS += \
de3cecef
MT
327 $(triggersdir)
328
329# ------------------------------------------------------------------------------
330
5ca9dc30 331MANPAGES = \
2b0ff832 332 man/firewall-settings.8 \
5ca9dc30 333 man/network.8 \
5ca9dc30 334 man/network-device.8 \
427f5ae2 335 man/network-dhcp.8 \
5ca9dc30 336 man/network-dns-server.8 \
de72bd91 337 man/network-performance-tuning.8 \
7a302fa7 338 man/network-port.8 \
5ca9dc30
MT
339 man/network-port-batman-adv.8 \
340 man/network-port-batman-adv-port.8 \
94eab754 341 man/network-quick-start.8 \
5ca9dc30 342 man/network-route.8 \
2b0ff832 343 man/network-settings.8 \
5ca9dc30 344 man/network-zone.8 \
5ca9dc30 345 man/network-zone-6to4-tunnel.8 \
5ca9dc30
MT
346 man/network-zone-bridge.8 \
347 man/network-zone-config-pppoe-server.8 \
7a302fa7 348 man/network-zone-modem.8 \
2fb7ae4d
MT
349 man/network-zone-pppoe.8 \
350 man/network-zone-wireless.8
5ca9dc30
MT
351
352MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
353MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
354
355.PHONY: man
356man: $(MANPAGES) $(MANPAGES_HTML)
357
358man_MANS = \
359 $(MANPAGES)
360
361noinst_DATA += \
362 $(MANPAGES_HTML)
363
364CLEANFILES += \
365 $(man_MANS) \
366 $(MANPAGES_HTML)
367
368EXTRA_DIST += \
369 $(MANPAGES_XML) \
370 man/custom-html.xsl
371
372XSLTPROC_FLAGS = \
373 --nonet \
374 --stringparam man.output.quietly 1 \
375 --stringparam funcsynopsis.style ansi \
376 --stringparam man.th.extra1.suppress 1 \
377 --stringparam man.authors.section.enabled 1 \
378 --stringparam man.copyright.section.enabled 1
379
380XSLTPROC_COMMAND_MAN = \
381 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
382 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
383
384XSLTPROC_COMMAND_HTML = \
385 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
386
387man/%.8: man/%.xml
388 $(XSLTPROC_COMMAND_MAN)
389
390man/%.html: man/%.xml man/custom-html.xsl
391 $(XSLTPROC_COMMAND_HTML)
392
393# ------------------------------------------------------------------------------
394
395substitutions = \
396 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
397 '|PACKAGE_URL=$(PACKAGE_URL)|' \
398 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
399 '|prefix=$(prefix)|' \
400 '|exec_prefix=$(exec_prefix)|' \
401 '|sbindir=$(sbindir)|' \
c6525a63
MT
402 '|networkdir=$(networkdir)|' \
403 '|helpersdir=$(helpersdir)|'
5ca9dc30
MT
404
405SED_PROCESS = \
406 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
407 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
408 < $< > $@
409
410src/functions/functions: src/functions/functions.in Makefile
411 $(SED_PROCESS)
412
413src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
414 $(SED_PROCESS)
415
416src/systemd/%: src/systemd/%.in Makefile
417 $(SED_PROCESS)
418
419src/%.pc: src/%.pc.in Makefile
420 $(SED_PROCESS)
421
422INSTALL_DIRS += \
423 $(sbindir)
424
425install-exec-hook: $(INSTALL_EXEC_HOOKS)
426
427uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
428
429# - testsuite ------------------------------------------------------------------
430
431TESTS_ENVIRONMENT = \
8744a476
MT
432 PATH=$(top_builddir)/src:$(PATH) \
433 functions=$(abs_builddir)/src/functions/functions \
434 networkdir=$(abs_srcdir)/src/functions \
435 testdir=$(top_srcdir)/test
436
437dist_check_DATA = \
ee86c73f
MT
438 test/constants.sh \
439 test/test-functions
5ca9dc30
MT
440
441dist_check_SCRIPTS = \
8744a476 442 $(TESTS)
5ca9dc30
MT
443
444TESTS = \
bb8304ec 445 test/load-library \
bb8304ec 446 test/functions/ip/ip_detect_protocol \
bb8304ec 447 test/functions/ip/ip_get_prefix \
b7fd8067
MT
448 test/functions/ip/ip_is_network \
449 test/functions/ip/ip_is_valid \
b862734c 450 test/functions/ip/ip_network_is_subnet_of \
b7fd8067
MT
451 test/functions/ip/ip_prefix_is_valid \
452 test/functions/ip/ip_protocol_is_supported \
453 test/functions/ip/ip_split_prefix