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 systemconfigdir = $(datadir)/network
36 sysctldir = $(prefix)/lib/sysctl.d
37 tmpfilesdir = $(prefix)/lib/tmpfiles.d
38 udevrulesdir = $(udevdir)/rules.d
40 networkdir = $(libexecdir)/network
41 helpersdir = $(networkdir)/helpers
43 macrosdir = $(libexecdir)/firewall/macros
45 hooksdir = $(networkdir)/hooks
46 hooks_configsdir = $(hooksdir)/configs
47 hooks_portsdir = $(hooksdir)/ports
48 hooks_zonesdir = $(hooksdir)/zones
50 triggersdir = $(networkdir)/triggers
52 logdir = $(localestatedir)/log/network
59 UNINSTALL_EXEC_HOOKS =
62 AM_CFLAGS = $(OUR_CFLAGS)
63 AM_CPPFLAGS = $(OUR_CPPFLAGS)
64 AM_LDFLAGS = $(OUR_LDFLAGS)
66 DISTCHECK_CONFIGURE_FLAGS = \
67 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
68 --with-udevdir=$$dc_install_base/$(udevdir)
70 install-directories-hook:
71 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
73 INSTALL_EXEC_HOOKS += \
74 install-directories-hook
76 # ------------------------------------------------------------------------------
78 AM_V_XSLT = $(AM_V_XSLT_$(V))
79 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
80 AM_V_XSLT_0 = @echo " XSLT " $@;
82 # ------------------------------------------------------------------------------
97 src/functions/functions
100 src/functions/functions
103 src/functions/functions.in
105 dist_network_SCRIPTS = \
106 src/functions/functions.at \
107 src/functions/functions.auth \
108 src/functions/functions.batman-adv \
109 src/functions/functions.bonding \
110 src/functions/functions.bridge \
111 src/functions/functions.cli \
112 src/functions/functions.cli.firewall \
113 src/functions/functions.colors \
114 src/functions/functions.config \
115 src/functions/functions.conntrack \
116 src/functions/functions.constants \
117 src/functions/functions.constants-firewall \
118 src/functions/functions.db \
119 src/functions/functions.description \
120 src/functions/functions.device \
121 src/functions/functions.dhclient \
122 src/functions/functions.dhcpd \
123 src/functions/functions.distro \
124 src/functions/functions.dns \
125 src/functions/functions.dummy \
126 src/functions/functions.editor \
127 src/functions/functions.firewall \
128 src/functions/functions.firewall-policy \
129 src/functions/functions.firewall-zones \
130 src/functions/functions.he \
131 src/functions/functions.hook \
132 src/functions/functions.hostapd \
133 src/functions/functions.hotplug \
134 src/functions/functions.http \
135 src/functions/functions.interrupts \
136 src/functions/functions.ip \
137 src/functions/functions.ipsec \
138 src/functions/functions.ipsec-pool \
139 src/functions/functions.iptables \
140 src/functions/functions.ip-tunnel \
141 src/functions/functions.ipv4 \
142 src/functions/functions.ipv6 \
143 src/functions/functions.list \
144 src/functions/functions.lock \
145 src/functions/functions.logging \
146 src/functions/functions.macros \
147 src/functions/functions.modem \
148 src/functions/functions.phy \
149 src/functions/functions.ports \
150 src/functions/functions.ppp \
151 src/functions/functions.pppoe-server \
152 src/functions/functions.radvd \
153 src/functions/functions.route \
154 src/functions/functions.routing \
155 src/functions/functions.serial \
156 src/functions/functions.service \
157 src/functions/functions.settings \
158 src/functions/functions.stp \
159 src/functions/functions.sysctl \
160 src/functions/functions.system \
161 src/functions/functions.triggers \
162 src/functions/functions.usb \
163 src/functions/functions.util \
164 src/functions/functions.vlan \
165 src/functions/functions.vpn \
166 src/functions/functions.vpn-security-policies \
167 src/functions/functions.wireless \
168 src/functions/functions.wpa_supplicant \
169 src/functions/functions.zone \
170 src/network-radvd-config \
171 src/dhclient-helper \
178 dist_helpers_SCRIPTS = \
179 src/helpers/dhcpd-config-helper \
180 src/helpers/firewall-kernel-init \
181 src/helpers/hostapd-config-helper \
182 src/helpers/ipsec-updown \
183 src/helpers/pppd-angel \
184 src/helpers/wpa_supplicant \
185 src/helpers/wpa_supplicant-config-helper
190 src_inetcalc_SOURCES = \
193 dist_hooks_configs_SCRIPTS = \
194 src/hooks/configs/dhcp \
195 src/hooks/configs/ipv4-static \
196 src/hooks/configs/ipv6-auto \
197 src/hooks/configs/ipv6-static \
198 src/hooks/configs/pppoe-server
200 dist_hooks_ports_SCRIPTS = \
201 src/hooks/ports/batman-adv \
202 src/hooks/ports/bonding \
203 src/hooks/ports/dummy \
204 src/hooks/ports/ethernet \
205 src/hooks/ports/vlan \
206 src/hooks/ports/wireless-adhoc \
207 src/hooks/ports/wireless-ap \
208 src/hooks/ports/wireless-mesh
210 dist_hooks_zones_SCRIPTS = \
211 src/hooks/zones/6to4-tunnel \
212 src/hooks/zones/bridge \
213 src/hooks/zones/modem \
214 src/hooks/zones/pppoe \
215 src/hooks/zones/wireless
217 # ------------------------------------------------------------------------------
233 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
234 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
235 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
236 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
237 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
240 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
241 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
243 INSTALL_EXEC_HOOKS += ppp-install-hook
244 UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
246 # ------------------------------------------------------------------------------
249 systemdsystemunit_DATA = \
250 src/systemd/firewall4.service \
251 src/systemd/firewall6.service \
252 src/systemd/firewall-init.service \
253 src/systemd/network-init.service \
254 src/systemd/network@.service
257 $(systemdsystemunit_DATA)
260 $(systemdsystemunitdir)
264 src/systemd/firewall4.service.in \
265 src/systemd/firewall6.service.in \
266 src/systemd/firewall-init.service.in \
267 src/systemd/network-init.service.in \
268 src/systemd/network@.service.in
270 # ------------------------------------------------------------------------------
272 systemconfig_vpndir = $(systemconfigdir)/vpn
274 dist_systemconfig_vpn_security_policies_DATA = \
275 config/vpn/security-policies/performance \
276 config/vpn/security-policies/system
278 systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies
280 # ------------------------------------------------------------------------------
283 src/sysctl/network.conf
285 # ------------------------------------------------------------------------------
287 dist_bashcompletion_SCRIPTS = \
288 src/bash-completion/network
290 # ------------------------------------------------------------------------------
292 dist_tmpfiles_DATA = \
293 src/tmpfiles/network.conf
295 # ------------------------------------------------------------------------------
298 dist_udev_SCRIPTS = \
299 src/udev/network-hotplug \
300 src/udev/network-hotplug-rename \
301 src/udev/network-hotplug-serial
303 dist_udevrules_DATA = \
304 src/udev/rules.d/50-serial-whitelist.rules \
305 src/udev/rules.d/60-net.rules
312 # ------------------------------------------------------------------------------
314 pkgconfigdata_DATA = \
318 $(pkgconfigdata_DATA)
323 # ------------------------------------------------------------------------------
331 # ------------------------------------------------------------------------------
336 # ------------------------------------------------------------------------------
339 man/firewall-settings.8 \
341 man/network-color.8 \
342 man/network-description.8 \
343 man/network-device.8 \
345 man/network-dns-server.8 \
346 man/network-performance-tuning.8 \
348 man/network-port-batman-adv.8 \
349 man/network-port-batman-adv-port.8 \
350 man/network-quick-start.8 \
351 man/network-route.8 \
352 man/network-route-static.8 \
353 man/network-settings.8 \
355 man/network-zone-6to4-tunnel.8 \
356 man/network-zone-bridge.8 \
357 man/network-zone-config-pppoe-server.8 \
358 man/network-zone-modem.8 \
359 man/network-zone-pppoe.8 \
360 man/network-zone-wireless.8
362 MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
363 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
366 man: $(MANPAGES) $(MANPAGES_HTML)
384 --stringparam man.output.quietly 1 \
385 --stringparam funcsynopsis.style ansi \
386 --stringparam man.th.extra1.suppress 1 \
387 --stringparam man.authors.section.enabled 1 \
388 --stringparam man.copyright.section.enabled 1
390 XSLTPROC_COMMAND_MAN = \
391 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
392 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
394 XSLTPROC_COMMAND_HTML = \
395 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
398 $(XSLTPROC_COMMAND_MAN)
400 man/%.html: man/%.xml man/custom-html.xsl
401 $(XSLTPROC_COMMAND_HTML)
403 # ------------------------------------------------------------------------------
406 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
407 '|PACKAGE_URL=$(PACKAGE_URL)|' \
408 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
409 '|prefix=$(prefix)|' \
410 '|exec_prefix=$(exec_prefix)|' \
411 '|sbindir=$(sbindir)|' \
412 '|networkdir=$(networkdir)|' \
413 '|helpersdir=$(helpersdir)|'
416 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
417 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
420 src/functions/functions: src/functions/functions.in Makefile
423 src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
426 src/systemd/%: src/systemd/%.in Makefile
429 src/%.pc: src/%.pc.in Makefile
435 install-exec-hook: $(INSTALL_EXEC_HOOKS)
437 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
439 # - testsuite ------------------------------------------------------------------
441 TESTS_ENVIRONMENT = \
442 PATH=$(top_builddir)/src:$(PATH) \
443 functions=$(abs_builddir)/src/functions/functions \
444 networkdir=$(abs_srcdir)/src/functions \
445 testdir=$(top_srcdir)/test
451 dist_check_SCRIPTS = \
456 test/functions/ip/ip_detect_protocol \
457 test/functions/ip/ip_get_prefix \
458 test/functions/ip/ip_net_is_valid \
459 test/functions/ip/ip_is_valid \
460 test/functions/ip/ip_network_is_subnet_of \
461 test/functions/ip/ip_prefix_is_valid \
462 test/functions/ip/ip_protocol_is_supported \
463 test/functions/ip/ip_split_prefix