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 configdir = $(sysconfdir)/network
32 bashcompletiondir= $(datadir)/bash-completion/completions
33 libexecdir = $(prefix)/lib
34 pkgconfigdir = $(libdir)/pkgconfig
35 pppdir = $(sysconfdir)/ppp
36 systemconfigdir = $(datadir)/network
37 sysctldir = $(prefix)/lib/sysctl.d
38 tmpfilesdir = $(prefix)/lib/tmpfiles.d
39 udevrulesdir = $(udevdir)/rules.d
41 networkdir = $(libexecdir)/network
42 helpersdir = $(networkdir)/helpers
44 macrosdir = $(libexecdir)/firewall/macros
46 hooksdir = $(networkdir)/hooks
47 hooks_configsdir = $(hooksdir)/configs
48 hooks_portsdir = $(hooksdir)/ports
49 hooks_zonesdir = $(hooksdir)/zones
51 triggersdir = $(networkdir)/triggers
53 logdir = $(localestatedir)/log/network
54 utildir = $(networkdir)
61 UNINSTALL_EXEC_HOOKS =
66 -include $(top_builddir)/config.h \
67 -I${top_srcdir}/src/libnetwork
80 DISTCHECK_CONFIGURE_FLAGS = \
81 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
82 --with-udevdir=$$dc_install_base/$(udevdir)
84 install-directories-hook:
85 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
87 INSTALL_EXEC_HOOKS += \
88 install-directories-hook
90 # ------------------------------------------------------------------------------
92 AM_V_NITSI = $(AM_V_NITSI_$(V))
93 AM_V_NITSI_ = $(AM_V_NITSI_$(AM_DEFAULT_VERBOSITY))
94 AM_V_NITSI_0 = @echo " NITSI " $@;
96 AM_V_XSLT = $(AM_V_XSLT_$(V))
97 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
98 AM_V_XSLT_0 = @echo " XSLT " $@;
100 # ------------------------------------------------------------------------------
107 dist_sbin_SCRIPTS = \
108 src/dhclient-script \
109 src/firewall-config \
115 src/functions/functions
118 src/functions/functions
121 src/functions/functions.in
123 dist_network_DATA = \
124 src/functions/functions.at \
125 src/functions/functions.auth \
126 src/functions/functions.bonding \
127 src/functions/functions.bridge \
128 src/functions/functions.cli \
129 src/functions/functions.cli.firewall \
130 src/functions/functions.colors \
131 src/functions/functions.config \
132 src/functions/functions.conntrack \
133 src/functions/functions.constants \
134 src/functions/functions.constants-firewall \
135 src/functions/functions.db \
136 src/functions/functions.description \
137 src/functions/functions.device \
138 src/functions/functions.dhclient \
139 src/functions/functions.dhcpd \
140 src/functions/functions.distro \
141 src/functions/functions.dns \
142 src/functions/functions.dummy \
143 src/functions/functions.editor \
144 src/functions/functions.firewall \
145 src/functions/functions.firewall-policy \
146 src/functions/functions.firewall-zones \
147 src/functions/functions.he \
148 src/functions/functions.hook \
149 src/functions/functions.hostapd \
150 src/functions/functions.hotplug \
151 src/functions/functions.http \
152 src/functions/functions.interrupts \
153 src/functions/functions.ip \
154 src/functions/functions.ipsec \
155 src/functions/functions.ipsec-pool \
156 src/functions/functions.iptables \
157 src/functions/functions.ip-tunnel \
158 src/functions/functions.ipv4 \
159 src/functions/functions.ipv6 \
160 src/functions/functions.list \
161 src/functions/functions.lock \
162 src/functions/functions.logging \
163 src/functions/functions.macros \
164 src/functions/functions.modem \
165 src/functions/functions.phy \
166 src/functions/functions.ports \
167 src/functions/functions.ppp \
168 src/functions/functions.pppoe-server \
169 src/functions/functions.radvd \
170 src/functions/functions.route \
171 src/functions/functions.routing \
172 src/functions/functions.serial \
173 src/functions/functions.service \
174 src/functions/functions.settings \
175 src/functions/functions.stp \
176 src/functions/functions.sysctl \
177 src/functions/functions.system \
178 src/functions/functions.triggers \
179 src/functions/functions.usb \
180 src/functions/functions.util \
181 src/functions/functions.vlan \
182 src/functions/functions.vpn \
183 src/functions/functions.vpn-security-policies \
184 src/functions/functions.wireless \
185 src/functions/functions.wireless-mesh \
186 src/functions/functions.wireless-networks \
187 src/functions/functions.wpa_supplicant \
188 src/functions/functions.zone \
189 src/network-radvd-config \
190 src/dhclient-helper \
197 dist_helpers_SCRIPTS = \
198 src/helpers/dhcpd-config-helper \
199 src/helpers/firewall-kernel-init \
200 src/helpers/hostapd-config-helper \
201 src/helpers/ipsec-updown \
202 src/helpers/pppd-angel \
203 src/helpers/wpa_supplicant
208 src_inetcalc_SOURCES = \
211 src_inetcalc_LDADD = \
214 dist_hooks_configs_SCRIPTS = \
215 src/hooks/configs/dhcp \
216 src/hooks/configs/ipv6-auto \
217 src/hooks/configs/pppoe-server \
218 src/hooks/configs/static
220 dist_hooks_ports_SCRIPTS = \
221 src/hooks/ports/bonding \
222 src/hooks/ports/dummy \
223 src/hooks/ports/ethernet \
224 src/hooks/ports/vlan \
225 src/hooks/ports/wireless-ap \
226 src/hooks/ports/wireless-mesh
228 dist_hooks_zones_SCRIPTS = \
229 src/hooks/zones/6to4-tunnel \
230 src/hooks/zones/bridge \
231 src/hooks/zones/modem \
232 src/hooks/zones/pppoe \
233 src/hooks/zones/wireless
239 $(configdir)/vpn/ipsec/connections \
240 $(configdir)/vpn/security-policies \
241 $(configdir)/wireless \
242 $(configdir)/wireless/networks \
245 # ------------------------------------------------------------------------------
248 LIBNETWORK_REVISION=0
251 pkginclude_HEADERS = \
252 src/libnetwork/network/interface.h \
253 src/libnetwork/network/libnetwork.h \
254 src/libnetwork/network/logging.h \
255 src/libnetwork/network/phy.h
260 src_libnetwork_la_SOURCES = \
261 src/libnetwork/interface.c \
262 src/libnetwork/libnetwork-private.h \
263 src/libnetwork/libnetwork.c \
266 src_libnetwork_la_LIBADD = \
269 src_libnetwork_la_CPPFLAGS = \
275 src_libnetwork_la_CFLAGS = \
279 src_libnetwork_la_LDFLAGS = \
281 -version-info $(LIBNETWORK_CURRENT):$(LIBNETWORK_REVISION):$(LIBNETWORK_AGE) \
282 -Wl,--version-script=$(top_srcdir)/src/libnetwork/libnetwork.sym
284 src_libnetwork_la_DEPENDENCIES = \
285 src/libnetwork/libnetwork.sym
288 src/libnetwork/libnetwork.sym
290 # ------------------------------------------------------------------------------
293 src/utils/network-phy-list-ht-caps
295 src_utils_network_phy_list_ht_caps_SOURCES = \
296 src/utils/network-phy-list-ht-caps.c
298 src_utils_network_phy_list_ht_caps_LDADD = \
301 # ------------------------------------------------------------------------------
317 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
318 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
319 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
320 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
321 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
324 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
325 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
327 INSTALL_EXEC_HOOKS += ppp-install-hook
328 UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
330 # ------------------------------------------------------------------------------
333 systemdsystemunit_DATA = \
334 src/systemd/firewall4.service \
335 src/systemd/firewall6.service \
336 src/systemd/firewall-init.service \
337 src/systemd/network-init.service \
338 src/systemd/network@.service
341 $(systemdsystemunit_DATA)
344 $(systemdsystemunitdir)
348 src/systemd/firewall4.service.in \
349 src/systemd/firewall6.service.in \
350 src/systemd/firewall-init.service.in \
351 src/systemd/network-init.service.in \
352 src/systemd/network@.service.in
354 # ------------------------------------------------------------------------------
356 systemconfig_vpndir = $(systemconfigdir)/vpn
358 dist_systemconfig_vpn_security_policies_DATA = \
359 config/vpn/security-policies/performance \
360 config/vpn/security-policies/system
362 systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies
364 # ------------------------------------------------------------------------------
367 src/sysctl/network.conf
369 # ------------------------------------------------------------------------------
371 dist_bashcompletion_SCRIPTS = \
372 src/bash-completion/network
374 # ------------------------------------------------------------------------------
376 dist_tmpfiles_DATA = \
377 src/tmpfiles/network.conf
379 # ------------------------------------------------------------------------------
382 dist_udev_SCRIPTS = \
383 src/udev/network-hotplug \
384 src/udev/network-hotplug-rename \
385 src/udev/network-hotplug-serial
387 dist_udevrules_DATA = \
388 src/udev/rules.d/50-serial-whitelist.rules \
389 src/udev/rules.d/60-net.rules
396 # ------------------------------------------------------------------------------
407 # ------------------------------------------------------------------------------
415 # ------------------------------------------------------------------------------
420 # ------------------------------------------------------------------------------
423 man/firewall-settings.8 \
425 man/network-color.8 \
426 man/network-description.8 \
427 man/network-device.8 \
429 man/network-dns-server.8 \
430 man/network-performance-tuning.8 \
432 man/network-quick-start.8 \
433 man/network-route.8 \
434 man/network-route-static.8 \
435 man/network-settings.8 \
437 man/network-vpn-security-policies.8 \
439 man/network-zone-6to4-tunnel.8 \
440 man/network-zone-bridge.8 \
441 man/network-zone-config-pppoe-server.8 \
442 man/network-zone-modem.8 \
443 man/network-zone-pppoe.8 \
444 man/network-zone-wireless.8
446 MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
447 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
450 man: $(MANPAGES) $(MANPAGES_HTML)
468 --stringparam man.output.quietly 1 \
469 --stringparam funcsynopsis.style ansi \
470 --stringparam man.th.extra1.suppress 1 \
471 --stringparam man.authors.section.enabled 1 \
472 --stringparam man.copyright.section.enabled 1
474 XSLTPROC_COMMAND_MAN = \
475 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
476 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
478 XSLTPROC_COMMAND_HTML = \
479 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
482 $(XSLTPROC_COMMAND_MAN)
484 man/%.html: man/%.xml man/custom-html.xsl
485 $(XSLTPROC_COMMAND_HTML)
487 # ------------------------------------------------------------------------------
490 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
491 '|PACKAGE_URL=$(PACKAGE_URL)|' \
492 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
493 '|builddir=$(abs_builddir)|' \
494 '|prefix=$(prefix)|' \
495 '|exec_prefix=$(exec_prefix)|' \
496 '|sbindir=$(sbindir)|' \
497 '|networkdir=$(networkdir)|' \
498 '|helpersdir=$(helpersdir)|' \
499 '|utildir=$(utildir)|'
502 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
503 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
512 install-exec-hook: $(INSTALL_EXEC_HOOKS)
514 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
516 # - testsuite ------------------------------------------------------------------
518 TESTS_ENVIRONMENT = \
519 LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \
520 PATH=$(top_builddir)/src:$(PATH) \
521 functions=$(abs_builddir)/src/functions/functions \
522 networkdir=$(abs_srcdir)/src/functions \
523 testdir=$(top_srcdir)/test
529 dist_check_SCRIPTS = \
534 test/functions/ip/ip_detect_protocol \
535 test/functions/ip/ip_get_prefix \
536 test/functions/ip/ip_net_is_valid \
537 test/functions/ip/ip_is_valid \
538 test/functions/ip/ip_network_is_subnet_of \
539 test/functions/ip/ip_prefix_is_valid \
540 test/functions/ip/ip_protocol_is_supported \
541 test/functions/ip/ip_split_prefix
543 # - NITSI tests ----------------------------------------------------------------
546 test/nitsi/test/hello-world \
547 test/nitsi/test/make-check
550 test/nitsi/test/hello-world/recipe \
551 test/nitsi/test/hello-world/settings \
552 test/nitsi/test/make-check/recipe.in \
553 test/nitsi/test/make-check/settings.in
556 test/nitsi/test/make-check/recipe \
557 test/nitsi/test/make-check/settings
561 .PHONY: $(NITSI_TESTS)
562 $(NITSI_TESTS): % : %/recipe %/settings
563 $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error -d $@
566 nitsi: dist $(NITSI_TESTS)