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_XSLT = $(AM_V_XSLT_$(V))
93 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
94 AM_V_XSLT_0 = @echo " XSLT " $@;
96 # ------------------------------------------------------------------------------
103 dist_sbin_SCRIPTS = \
104 src/dhclient-script \
105 src/firewall-config \
111 src/functions/functions
114 src/functions/functions
117 src/functions/functions.in
119 dist_network_DATA = \
120 src/functions/functions.at \
121 src/functions/functions.auth \
122 src/functions/functions.bonding \
123 src/functions/functions.bridge \
124 src/functions/functions.cli \
125 src/functions/functions.cli.firewall \
126 src/functions/functions.colors \
127 src/functions/functions.config \
128 src/functions/functions.conntrack \
129 src/functions/functions.constants \
130 src/functions/functions.constants-firewall \
131 src/functions/functions.db \
132 src/functions/functions.description \
133 src/functions/functions.device \
134 src/functions/functions.dhclient \
135 src/functions/functions.dhcpd \
136 src/functions/functions.distro \
137 src/functions/functions.dns \
138 src/functions/functions.dummy \
139 src/functions/functions.editor \
140 src/functions/functions.firewall \
141 src/functions/functions.firewall-policy \
142 src/functions/functions.firewall-zones \
143 src/functions/functions.he \
144 src/functions/functions.hook \
145 src/functions/functions.hostapd \
146 src/functions/functions.hotplug \
147 src/functions/functions.http \
148 src/functions/functions.interrupts \
149 src/functions/functions.ip \
150 src/functions/functions.ipsec \
151 src/functions/functions.ipsec-pool \
152 src/functions/functions.iptables \
153 src/functions/functions.ip-tunnel \
154 src/functions/functions.ipv4 \
155 src/functions/functions.ipv6 \
156 src/functions/functions.list \
157 src/functions/functions.lock \
158 src/functions/functions.logging \
159 src/functions/functions.macros \
160 src/functions/functions.modem \
161 src/functions/functions.phy \
162 src/functions/functions.ports \
163 src/functions/functions.ppp \
164 src/functions/functions.pppoe-server \
165 src/functions/functions.radvd \
166 src/functions/functions.route \
167 src/functions/functions.routing \
168 src/functions/functions.serial \
169 src/functions/functions.service \
170 src/functions/functions.settings \
171 src/functions/functions.stp \
172 src/functions/functions.sysctl \
173 src/functions/functions.system \
174 src/functions/functions.triggers \
175 src/functions/functions.usb \
176 src/functions/functions.util \
177 src/functions/functions.vlan \
178 src/functions/functions.vpn \
179 src/functions/functions.vpn-security-policies \
180 src/functions/functions.wireless \
181 src/functions/functions.wireless-mesh \
182 src/functions/functions.wireless-networks \
183 src/functions/functions.wpa_supplicant \
184 src/functions/functions.zone \
185 src/network-radvd-config \
186 src/dhclient-helper \
193 dist_helpers_SCRIPTS = \
194 src/helpers/dhcpd-config-helper \
195 src/helpers/firewall-kernel-init \
196 src/helpers/hostapd-config-helper \
197 src/helpers/ipsec-updown \
198 src/helpers/pppd-angel \
199 src/helpers/wpa_supplicant
204 src_inetcalc_SOURCES = \
207 src_inetcalc_LDADD = \
210 dist_hooks_configs_SCRIPTS = \
211 src/hooks/configs/dhcp \
212 src/hooks/configs/ipv4-static \
213 src/hooks/configs/ipv6-auto \
214 src/hooks/configs/ipv6-static \
215 src/hooks/configs/pppoe-server
217 dist_hooks_ports_SCRIPTS = \
218 src/hooks/ports/bonding \
219 src/hooks/ports/dummy \
220 src/hooks/ports/ethernet \
221 src/hooks/ports/vlan \
222 src/hooks/ports/wireless-ap \
223 src/hooks/ports/wireless-mesh
225 dist_hooks_zones_SCRIPTS = \
226 src/hooks/zones/6to4-tunnel \
227 src/hooks/zones/bridge \
228 src/hooks/zones/modem \
229 src/hooks/zones/pppoe \
230 src/hooks/zones/wireless
236 $(configdir)/vpn/ipsec/connections \
237 $(configdir)/vpn/security-policies \
238 $(configdir)/wireless \
239 $(configdir)/wireless/networks \
242 # ------------------------------------------------------------------------------
245 LIBNETWORK_REVISION=0
248 pkginclude_HEADERS = \
249 src/libnetwork/network/interface.h \
250 src/libnetwork/network/libnetwork.h \
251 src/libnetwork/network/logging.h \
252 src/libnetwork/network/phy.h
257 src_libnetwork_la_SOURCES = \
258 src/libnetwork/interface.c \
259 src/libnetwork/libnetwork-private.h \
260 src/libnetwork/libnetwork.c \
263 src_libnetwork_la_LIBADD = \
266 src_libnetwork_la_CPPFLAGS = \
272 src_libnetwork_la_CFLAGS = \
276 src_libnetwork_la_LDFLAGS = \
278 -version-info $(LIBNETWORK_CURRENT):$(LIBNETWORK_REVISION):$(LIBNETWORK_AGE) \
279 -Wl,--version-script=$(top_srcdir)/src/libnetwork/libnetwork.sym
281 src_libnetwork_la_DEPENDENCIES = \
282 src/libnetwork/libnetwork.sym
285 src/libnetwork/libnetwork.sym
287 # ------------------------------------------------------------------------------
290 src/utils/network-phy-list-ht-caps
292 src_utils_network_phy_list_ht_caps_SOURCES = \
293 src/utils/network-phy-list-ht-caps.c
295 src_utils_network_phy_list_ht_caps_LDADD = \
298 # ------------------------------------------------------------------------------
314 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
315 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
316 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
317 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
318 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
321 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
322 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
324 INSTALL_EXEC_HOOKS += ppp-install-hook
325 UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
327 # ------------------------------------------------------------------------------
330 systemdsystemunit_DATA = \
331 src/systemd/firewall4.service \
332 src/systemd/firewall6.service \
333 src/systemd/firewall-init.service \
334 src/systemd/network-init.service \
335 src/systemd/network@.service
338 $(systemdsystemunit_DATA)
341 $(systemdsystemunitdir)
345 src/systemd/firewall4.service.in \
346 src/systemd/firewall6.service.in \
347 src/systemd/firewall-init.service.in \
348 src/systemd/network-init.service.in \
349 src/systemd/network@.service.in
351 # ------------------------------------------------------------------------------
353 systemconfig_vpndir = $(systemconfigdir)/vpn
355 dist_systemconfig_vpn_security_policies_DATA = \
356 config/vpn/security-policies/performance \
357 config/vpn/security-policies/system
359 systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies
361 # ------------------------------------------------------------------------------
364 src/sysctl/network.conf
366 # ------------------------------------------------------------------------------
368 dist_bashcompletion_SCRIPTS = \
369 src/bash-completion/network
371 # ------------------------------------------------------------------------------
373 dist_tmpfiles_DATA = \
374 src/tmpfiles/network.conf
376 # ------------------------------------------------------------------------------
379 dist_udev_SCRIPTS = \
380 src/udev/network-hotplug \
381 src/udev/network-hotplug-rename \
382 src/udev/network-hotplug-serial
384 dist_udevrules_DATA = \
385 src/udev/rules.d/50-serial-whitelist.rules \
386 src/udev/rules.d/60-net.rules
393 # ------------------------------------------------------------------------------
404 # ------------------------------------------------------------------------------
412 # ------------------------------------------------------------------------------
417 # ------------------------------------------------------------------------------
420 man/firewall-settings.8 \
422 man/network-color.8 \
423 man/network-description.8 \
424 man/network-device.8 \
426 man/network-dns-server.8 \
427 man/network-performance-tuning.8 \
429 man/network-quick-start.8 \
430 man/network-route.8 \
431 man/network-route-static.8 \
432 man/network-settings.8 \
434 man/network-vpn-security-policies.8 \
436 man/network-zone-6to4-tunnel.8 \
437 man/network-zone-bridge.8 \
438 man/network-zone-config-pppoe-server.8 \
439 man/network-zone-modem.8 \
440 man/network-zone-pppoe.8 \
441 man/network-zone-wireless.8
443 MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
444 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
447 man: $(MANPAGES) $(MANPAGES_HTML)
465 --stringparam man.output.quietly 1 \
466 --stringparam funcsynopsis.style ansi \
467 --stringparam man.th.extra1.suppress 1 \
468 --stringparam man.authors.section.enabled 1 \
469 --stringparam man.copyright.section.enabled 1
471 XSLTPROC_COMMAND_MAN = \
472 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
473 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
475 XSLTPROC_COMMAND_HTML = \
476 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
479 $(XSLTPROC_COMMAND_MAN)
481 man/%.html: man/%.xml man/custom-html.xsl
482 $(XSLTPROC_COMMAND_HTML)
484 # ------------------------------------------------------------------------------
487 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
488 '|PACKAGE_URL=$(PACKAGE_URL)|' \
489 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
490 '|prefix=$(prefix)|' \
491 '|exec_prefix=$(exec_prefix)|' \
492 '|sbindir=$(sbindir)|' \
493 '|networkdir=$(networkdir)|' \
494 '|helpersdir=$(helpersdir)|' \
495 '|utildir=$(utildir)|'
498 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
499 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
502 src/functions/functions: src/functions/functions.in Makefile
505 src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
508 src/systemd/%: src/systemd/%.in Makefile
511 src/%.pc: src/%.pc.in Makefile
517 install-exec-hook: $(INSTALL_EXEC_HOOKS)
519 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
521 # - testsuite ------------------------------------------------------------------
523 TESTS_ENVIRONMENT = \
524 LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \
525 PATH=$(top_builddir)/src:$(PATH) \
526 functions=$(abs_builddir)/src/functions/functions \
527 networkdir=$(abs_srcdir)/src/functions \
528 testdir=$(top_srcdir)/test
534 dist_check_SCRIPTS = \
539 test/functions/ip/ip_detect_protocol \
540 test/functions/ip/ip_get_prefix \
541 test/functions/ip/ip_net_is_valid \
542 test/functions/ip/ip_is_valid \
543 test/functions/ip/ip_network_is_subnet_of \
544 test/functions/ip/ip_prefix_is_valid \
545 test/functions/ip/ip_protocol_is_supported \
546 test/functions/ip/ip_split_prefix