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