1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2012-2013 IPFire Network Development Team #
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. #
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. #
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/>. #
19 ###############################################################################
21 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
22 AM_MAKEFLAGS = --no-print-directory
23 AUTOMAKE_OPTIONS = color-tests
25 # remove target it the command fails
28 # keep itermediate files
31 bashcompletiondir= $(datadir)/bash-completion/completions
32 libexecdir = $(prefix)/lib
33 pkgconfigdatadir = $(datadir)/pkgconfig
34 pppdir = $(sysconfdir)/ppp
35 sysctldir = $(prefix)/lib/sysctl.d
36 tmpfilesdir = $(prefix)/lib/tmpfiles.d
37 udevrulesdir = $(udevdir)/rules.d
39 networkdir = $(libexecdir)/network
40 helpersdir = $(networkdir)/helpers
42 macrosdir = $(libexecdir)/firewall/macros
44 hooksdir = $(networkdir)/hooks
45 hooks_configsdir = $(hooksdir)/configs
46 hooks_portsdir = $(hooksdir)/ports
47 hooks_zonesdir = $(hooksdir)/zones
49 triggersdir = $(networkdir)/triggers
56 UNINSTALL_EXEC_HOOKS =
59 DISTCHECK_CONFIGURE_FLAGS = \
60 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
61 --with-udevdir=$$dc_install_base/$(udevdir)
63 install-directories-hook:
64 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
66 INSTALL_EXEC_HOOKS += \
67 install-directories-hook
69 # ------------------------------------------------------------------------------
71 AM_V_XSLT = $(AM_V_XSLT_$(V))
72 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
73 AM_V_XSLT_0 = @echo " XSLT " $@;
75 # ------------------------------------------------------------------------------
89 src/functions/functions
92 src/functions/functions
95 src/functions/functions.in
97 dist_network_SCRIPTS = \
98 src/functions/functions.aiccu \
99 src/functions/functions.at \
100 src/functions/functions.auth \
101 src/functions/functions.batman-adv \
102 src/functions/functions.bonding \
103 src/functions/functions.bridge \
104 src/functions/functions.cli \
105 src/functions/functions.cli.firewall \
106 src/functions/functions.colors \
107 src/functions/functions.config \
108 src/functions/functions.conntrack \
109 src/functions/functions.constants \
110 src/functions/functions.constants-firewall \
111 src/functions/functions.db \
112 src/functions/functions.device \
113 src/functions/functions.dhclient \
114 src/functions/functions.dhcpd \
115 src/functions/functions.distro \
116 src/functions/functions.dns \
117 src/functions/functions.dummy \
118 src/functions/functions.ethernet \
119 src/functions/functions.firewall \
120 src/functions/functions.firewall-policy \
121 src/functions/functions.firewall-zones \
122 src/functions/functions.he \
123 src/functions/functions.hook \
124 src/functions/functions.hostapd \
125 src/functions/functions.hotplug \
126 src/functions/functions.http \
127 src/functions/functions.ip \
128 src/functions/functions.iptables \
129 src/functions/functions.ip-tunnel \
130 src/functions/functions.ipv4 \
131 src/functions/functions.ipv6 \
132 src/functions/functions.list \
133 src/functions/functions.lock \
134 src/functions/functions.logging \
135 src/functions/functions.macros \
136 src/functions/functions.modem \
137 src/functions/functions.phy \
138 src/functions/functions.ports \
139 src/functions/functions.ppp \
140 src/functions/functions.pppoe-server \
141 src/functions/functions.radvd \
142 src/functions/functions.red \
143 src/functions/functions.route \
144 src/functions/functions.routing \
145 src/functions/functions.serial \
146 src/functions/functions.service \
147 src/functions/functions.settings \
148 src/functions/functions.stp \
149 src/functions/functions.sysctl \
150 src/functions/functions.triggers \
151 src/functions/functions.usb \
152 src/functions/functions.util \
153 src/functions/functions.vlan \
154 src/functions/functions.wireless \
155 src/functions/functions.wpa_supplicant \
156 src/functions/functions.zone \
157 src/network-radvd-config \
158 src/dhclient-helper \
165 dist_helpers_SCRIPTS = \
166 src/helpers/aiccu-config-helper \
167 src/helpers/bridge-stp \
168 src/helpers/dhcpd-config-helper \
169 src/helpers/firewall-kernel-init \
170 src/helpers/hostapd-config-helper \
171 src/helpers/pppd-angel \
172 src/helpers/wpa_supplicant \
173 src/helpers/wpa_supplicant-config-helper
175 bridge-stp-install-hook: bridge-stp-uninstall-hook
176 ln -svf --relative $(DESTDIR)$(helpersdir)/bridge-stp $(DESTDIR)$(sbindir)/
178 bridge-stp-uninstall-hook:
179 rm -f $(DESTDIR)$(sbindir)/bridge-stp
181 INSTALL_EXEC_HOOKS += bridge-stp-install-hook
182 UNINSTALL_EXEC_HOOKS += bridge-stp-uninstall-hook
184 dist_hooks_configs_SCRIPTS = \
185 src/hooks/configs/ipv4-dhcp \
186 src/hooks/configs/ipv4-static \
187 src/hooks/configs/ipv6-auto \
188 src/hooks/configs/ipv6-dhcp \
189 src/hooks/configs/ipv6-static \
190 src/hooks/configs/pppoe-server
192 dist_hooks_ports_SCRIPTS = \
193 src/hooks/ports/batman-adv \
194 src/hooks/ports/bonding \
195 src/hooks/ports/dummy \
196 src/hooks/ports/ethernet \
197 src/hooks/ports/vlan \
198 src/hooks/ports/wireless-adhoc \
199 src/hooks/ports/wireless-ap
201 dist_hooks_zones_SCRIPTS = \
202 src/hooks/zones/6rd \
203 src/hooks/zones/6to4-tunnel \
204 src/hooks/zones/aiccu \
205 src/hooks/zones/bridge \
206 src/hooks/zones/modem \
207 src/hooks/zones/pppoe \
208 src/hooks/zones/wireless
210 # ------------------------------------------------------------------------------
225 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
226 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
227 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
228 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
229 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
232 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
233 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
235 INSTALL_EXEC_HOOKS += ppp-install-hook
236 UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
238 # ------------------------------------------------------------------------------
241 systemdsystemunit_DATA = \
242 src/systemd/firewall4.service \
243 src/systemd/firewall6.service \
244 src/systemd/firewall-init.service \
245 src/systemd/network-init.service \
246 src/systemd/network@.service
249 $(systemdsystemunit_DATA)
252 $(systemdsystemunitdir)
256 src/systemd/firewall4.service.in \
257 src/systemd/firewall6.service.in \
258 src/systemd/firewall-init.service.in \
259 src/systemd/network-init.service.in \
260 src/systemd/network@.service.in
262 # ------------------------------------------------------------------------------
265 src/sysctl/network.conf
267 # ------------------------------------------------------------------------------
269 dist_bashcompletion_SCRIPTS = \
270 src/bash-completion/network
272 # ------------------------------------------------------------------------------
274 dist_tmpfiles_DATA = \
277 # ------------------------------------------------------------------------------
280 dist_udev_SCRIPTS = \
281 src/udev/network-hotplug \
282 src/udev/network-hotplug-rename \
283 src/udev/network-hotplug-serial
285 dist_udevrules_DATA = \
286 src/udev/rules.d/50-serial-whitelist.rules \
287 src/udev/rules.d/60-net.rules
294 # ------------------------------------------------------------------------------
296 pkgconfigdata_DATA = \
300 $(pkgconfigdata_DATA)
305 # ------------------------------------------------------------------------------
313 # ------------------------------------------------------------------------------
318 # ------------------------------------------------------------------------------
321 man/firewall-settings.8 \
323 man/network-device.8 \
324 man/network-dns-server.8 \
325 man/network-port-batman-adv.8 \
326 man/network-port-batman-adv-port.8 \
327 man/network-route.8 \
328 man/network-settings.8 \
330 man/network-zone-6rd.8 \
331 man/network-zone-6to4-tunnel.8 \
332 man/network-zone-aiccu.8 \
333 man/network-zone-bridge.8 \
334 man/network-zone-config-pppoe-server.8 \
335 man/network-zone-pppoe.8
337 MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
338 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
341 man: $(MANPAGES) $(MANPAGES_HTML)
359 --stringparam man.output.quietly 1 \
360 --stringparam funcsynopsis.style ansi \
361 --stringparam man.th.extra1.suppress 1 \
362 --stringparam man.authors.section.enabled 1 \
363 --stringparam man.copyright.section.enabled 1
365 XSLTPROC_COMMAND_MAN = \
366 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
367 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
369 XSLTPROC_COMMAND_HTML = \
370 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
373 $(XSLTPROC_COMMAND_MAN)
375 man/%.html: man/%.xml man/custom-html.xsl
376 $(XSLTPROC_COMMAND_HTML)
378 # ------------------------------------------------------------------------------
381 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
382 '|PACKAGE_URL=$(PACKAGE_URL)|' \
383 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
384 '|prefix=$(prefix)|' \
385 '|exec_prefix=$(exec_prefix)|' \
386 '|sbindir=$(sbindir)|' \
387 '|networkdir=$(networkdir)|' \
388 '|helpersdir=$(helpersdir)|'
391 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
392 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
395 src/functions/functions: src/functions/functions.in Makefile
398 src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
401 src/systemd/%: src/systemd/%.in Makefile
404 src/%.pc: src/%.pc.in Makefile
410 install-exec-hook: $(INSTALL_EXEC_HOOKS)
412 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
414 # - testsuite ------------------------------------------------------------------
416 TESTS_ENVIRONMENT = \
417 topdir="$(shell pwd)" \
418 networkdir="$(top_srcdir)/src/functions"
420 dist_check_SCRIPTS = \