]> git.ipfire.org Git - people/ms/network.git/blame - Makefile.am
firewall: Drop firewall-config command in favour of "firewall settings"
[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
f166708b 31configdir = $(sysconfdir)/network
bae37360 32bashcompletiondir= $(datadir)/bash-completion/completions
5ca9dc30 33libexecdir = $(prefix)/lib
01f2b2e4 34pkgconfigdir = $(libdir)/pkgconfig
5ca9dc30 35pppdir = $(sysconfdir)/ppp
5e84cd41 36systemconfigdir = $(datadir)/network
5ca9dc30
MT
37sysctldir = $(prefix)/lib/sysctl.d
38tmpfilesdir = $(prefix)/lib/tmpfiles.d
39udevrulesdir = $(udevdir)/rules.d
40
41networkdir = $(libexecdir)/network
42helpersdir = $(networkdir)/helpers
43
44macrosdir = $(libexecdir)/firewall/macros
45
46hooksdir = $(networkdir)/hooks
7d2cb6d3 47hooks_configsdir = $(hooksdir)/configs
5ca9dc30
MT
48hooks_portsdir = $(hooksdir)/ports
49hooks_zonesdir = $(hooksdir)/zones
50
de3cecef
MT
51triggersdir = $(networkdir)/triggers
52
9c9d0585 53logdir = $(localestatedir)/log/network
e145b2f3 54utildir = $(networkdir)
9c9d0585 55
5ca9dc30
MT
56CLEANFILES =
57DISTCLEANFILES =
58EXTRA_DIST =
59INSTALL_DIRS =
60INSTALL_EXEC_HOOKS =
61UNINSTALL_EXEC_HOOKS =
62noinst_DATA =
63
01f2b2e4
MT
64AM_CPPFLAGS = \
65 $(OUR_CPPFLAGS) \
66 -include $(top_builddir)/config.h \
67 -I${top_srcdir}/src/libnetwork
68
69AM_CFLAGS = \
70 $(OUR_CFLAGS) \
71 -fvisibility=hidden \
72 -ffunction-sections \
73 -fdata-sections
74
75AM_LDFLAGS = \
76 $(OUR_LDFLAGS) \
77 -Wl,--gc-sections \
78 -Wl,--as-needed
e708653f 79
5ca9dc30
MT
80DISTCHECK_CONFIGURE_FLAGS = \
81 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
82 --with-udevdir=$$dc_install_base/$(udevdir)
83
84install-directories-hook:
85 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
86
87INSTALL_EXEC_HOOKS += \
88 install-directories-hook
89
90# ------------------------------------------------------------------------------
91
8f591cfc
MT
92AM_V_ASCIIDOC = $(AM_V_ASCIIDOC_$(V))
93AM_V_ASCIIDOC_ = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY))
94AM_V_ASCIIDOC_0 = @echo " ASCIIDOC" $@;
95
c4966dd6
MT
96AM_V_DOWNLOAD = $(AM_V_DOWNLOAD_$(V))
97AM_V_DOWNLOAD_ = $(AM_V_DOWNLOAD_$(AM_DEFAULT_VERBOSITY))
98AM_V_DOWNLOAD_0 = @echo " LOAD " $@;
99
1908d2b3
MT
100AM_V_NITSI = $(AM_V_NITSI_$(V))
101AM_V_NITSI_ = $(AM_V_NITSI_$(AM_DEFAULT_VERBOSITY))
102AM_V_NITSI_0 = @echo " NITSI " $@;
103
5ca9dc30
MT
104AM_V_XSLT = $(AM_V_XSLT_$(V))
105AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
106AM_V_XSLT_0 = @echo " XSLT " $@;
107
108# ------------------------------------------------------------------------------
109
110dist_doc_DATA = \
1337eee2 111 README \
dd46582c 112 docs/CODING_STYLE \
1337eee2 113 docs/COPYING
5ca9dc30
MT
114
115dist_sbin_SCRIPTS = \
116 src/dhclient-script \
0c5d22de 117 src/firewall \
5ca9dc30
MT
118 src/network
119
a62e991a 120network_DATA = \
5ca9dc30
MT
121 src/functions/functions
122
123CLEANFILES += \
124 src/functions/functions
125
126EXTRA_DIST += \
127 src/functions/functions.in
128
a62e991a 129dist_network_DATA = \
5ca9dc30
MT
130 src/functions/functions.at \
131 src/functions/functions.auth \
6a1b0fb1 132 src/functions/functions.bird \
5ca9dc30
MT
133 src/functions/functions.bonding \
134 src/functions/functions.bridge \
135 src/functions/functions.cli \
136 src/functions/functions.cli.firewall \
137 src/functions/functions.colors \
138 src/functions/functions.config \
139 src/functions/functions.conntrack \
140 src/functions/functions.constants \
141 src/functions/functions.constants-firewall \
142 src/functions/functions.db \
5ccc7299 143 src/functions/functions.description \
5ca9dc30
MT
144 src/functions/functions.device \
145 src/functions/functions.dhclient \
146 src/functions/functions.dhcpd \
147 src/functions/functions.distro \
148 src/functions/functions.dns \
149 src/functions/functions.dummy \
e524986c 150 src/functions/functions.editor \
5ca9dc30
MT
151 src/functions/functions.firewall \
152 src/functions/functions.firewall-policy \
153 src/functions/functions.firewall-zones \
154 src/functions/functions.he \
155 src/functions/functions.hook \
156 src/functions/functions.hostapd \
b8026986 157 src/functions/functions.hotplug \
5ca9dc30 158 src/functions/functions.http \
de72bd91 159 src/functions/functions.interrupts \
5ca9dc30 160 src/functions/functions.ip \
be844b7b 161 src/functions/functions.ipsec \
4e78b7ad 162 src/functions/functions.ipsec-pool \
5ca9dc30
MT
163 src/functions/functions.iptables \
164 src/functions/functions.ip-tunnel \
165 src/functions/functions.ipv4 \
166 src/functions/functions.ipv6 \
208f7452 167 src/functions/functions.leds \
5ca9dc30
MT
168 src/functions/functions.list \
169 src/functions/functions.lock \
170 src/functions/functions.logging \
171 src/functions/functions.macros \
5ca9dc30 172 src/functions/functions.modem \
3608f641 173 src/functions/functions.offloading \
5ca9dc30
MT
174 src/functions/functions.phy \
175 src/functions/functions.ports \
176 src/functions/functions.ppp \
177 src/functions/functions.pppoe-server \
5ca9dc30
MT
178 src/functions/functions.route \
179 src/functions/functions.routing \
180 src/functions/functions.serial \
181 src/functions/functions.service \
e9df08ad 182 src/functions/functions.settings \
5ca9dc30 183 src/functions/functions.stp \
5ca9dc30 184 src/functions/functions.sysctl \
de72bd91 185 src/functions/functions.system \
de3cecef 186 src/functions/functions.triggers \
5ca9dc30
MT
187 src/functions/functions.usb \
188 src/functions/functions.util \
189 src/functions/functions.vlan \
2da98f56 190 src/functions/functions.vpn \
3eae7bed 191 src/functions/functions.vpn-security-policies \
5ca9dc30 192 src/functions/functions.wireless \
81bf9898 193 src/functions/functions.wireless-mesh \
49958b8c 194 src/functions/functions.wireless-networks \
5ca9dc30
MT
195 src/functions/functions.wpa_supplicant \
196 src/functions/functions.zone \
5ca9dc30
MT
197 src/header-config \
198 src/header-port \
f9217f83 199 src/header-zone
5ca9dc30 200
b719b3f7 201dist_network_SCRIPTS = \
f9217f83
MT
202 src/dhclient-helper \
203 src/ppp/dialer \
204 src/ppp/pppoe-server
b719b3f7 205
5ca9dc30 206dist_helpers_SCRIPTS = \
5ca9dc30 207 src/helpers/dhcpd-config-helper \
5ca9dc30 208 src/helpers/hostapd-config-helper \
67baa452 209 src/helpers/ipsec-updown \
5ca9dc30 210 src/helpers/pppd-angel \
02807ad2 211 src/helpers/wpa_supplicant
5ca9dc30 212
13a6e69f
MT
213bin_PROGRAMS = \
214 src/inetcalc
215
216src_inetcalc_SOURCES = \
217 src/inetcalc.c
218
01f2b2e4
MT
219src_inetcalc_LDADD = \
220 src/libnetwork.la
221
7d2cb6d3 222dist_hooks_configs_SCRIPTS = \
9353a4e4 223 src/hooks/configs/dhcp \
b73e9d43 224 src/hooks/configs/ipv6-auto \
46a28dcd
MT
225 src/hooks/configs/pppoe-server \
226 src/hooks/configs/static
7d2cb6d3 227
5ca9dc30 228dist_hooks_ports_SCRIPTS = \
5ca9dc30
MT
229 src/hooks/ports/bonding \
230 src/hooks/ports/dummy \
231 src/hooks/ports/ethernet \
8032884d 232 src/hooks/ports/ip-tunnel \
5ca9dc30 233 src/hooks/ports/vlan \
727248f0
MT
234 src/hooks/ports/wireless-ap \
235 src/hooks/ports/wireless-mesh
5ca9dc30
MT
236
237dist_hooks_zones_SCRIPTS = \
5ca9dc30 238 src/hooks/zones/bridge \
85de251d 239 src/hooks/zones/ip-tunnel \
5ca9dc30
MT
240 src/hooks/zones/modem \
241 src/hooks/zones/pppoe \
5ca9dc30
MT
242 src/hooks/zones/wireless
243
f166708b
MT
244INSTALL_DIRS += \
245 $(configdir) \
246 $(configdir)/ports \
247 $(configdir)/vpn \
248 $(configdir)/vpn/ipsec/connections \
249 $(configdir)/vpn/security-policies \
250 $(configdir)/wireless \
251 $(configdir)/wireless/networks \
252 $(configdir)/zones
253
5ca9dc30
MT
254# ------------------------------------------------------------------------------
255
01f2b2e4
MT
256LIBNETWORK_CURRENT=0
257LIBNETWORK_REVISION=0
258LIBNETWORK_AGE=0
259
260pkginclude_HEADERS = \
248629ae 261 src/libnetwork/network/interface.h \
6f4814db 262 src/libnetwork/network/libnetwork.h \
9cb2f0c0
MT
263 src/libnetwork/network/logging.h \
264 src/libnetwork/network/phy.h
01f2b2e4
MT
265
266lib_LTLIBRARIES = \
267 src/libnetwork.la
268
269src_libnetwork_la_SOURCES = \
248629ae 270 src/libnetwork/interface.c \
01f2b2e4 271 src/libnetwork/libnetwork-private.h \
9cb2f0c0
MT
272 src/libnetwork/libnetwork.c \
273 src/libnetwork/phy.c
01f2b2e4 274
db0a2d76
MT
275src_libnetwork_la_LIBADD = \
276 $(LIBNL_LIBS)
277
6f4814db
MT
278src_libnetwork_la_CPPFLAGS = \
279 $(AM_CPPFLAGS) \
db0a2d76 280 $(LIBNL_CPPFLAGS) \
6f4814db
MT
281 -D_GNU_SOURCE \
282 -DNETWORK_PRIVATE
283
db0a2d76
MT
284src_libnetwork_la_CFLAGS = \
285 $(AM_CFLAGS) \
286 $(LIBNL_CFLAGS)
287
01f2b2e4
MT
288src_libnetwork_la_LDFLAGS = \
289 $(AM_LDFLAGS) \
290 -version-info $(LIBNETWORK_CURRENT):$(LIBNETWORK_REVISION):$(LIBNETWORK_AGE) \
291 -Wl,--version-script=$(top_srcdir)/src/libnetwork/libnetwork.sym
292
293src_libnetwork_la_DEPENDENCIES = \
294 src/libnetwork/libnetwork.sym
295
296EXTRA_DIST += \
297 src/libnetwork/libnetwork.sym
298
299# ------------------------------------------------------------------------------
e145b2f3
MT
300
301util_PROGRAMS = \
394cff53 302 src/utils/network-phy-list-channels \
2e4e3c88 303 src/utils/network-phy-list-ciphers \
b2323e58
MT
304 src/utils/network-phy-list-ht-caps \
305 src/utils/network-phy-list-vht-caps
e145b2f3 306
394cff53
MT
307src_utils_network_phy_list_channels_SOURCES = \
308 src/utils/network-phy-list-channels.c
309
310src_utils_network_phy_list_channels_LDADD = \
311 src/libnetwork.la
312
2e4e3c88
MT
313src_utils_network_phy_list_ciphers_SOURCES = \
314 src/utils/network-phy-list-ciphers.c
315
316src_utils_network_phy_list_ciphers_LDADD = \
317 src/libnetwork.la
318
e145b2f3
MT
319src_utils_network_phy_list_ht_caps_SOURCES = \
320 src/utils/network-phy-list-ht-caps.c
321
322src_utils_network_phy_list_ht_caps_LDADD = \
323 src/libnetwork.la
324
b2323e58
MT
325src_utils_network_phy_list_vht_caps_SOURCES = \
326 src/utils/network-phy-list-vht-caps.c
327
328src_utils_network_phy_list_vht_caps_LDADD = \
329 src/libnetwork.la
330
e145b2f3 331# ------------------------------------------------------------------------------
01f2b2e4 332
5ca9dc30
MT
333ppp_SCRIPTS = \
334 src/ppp/ip-updown
335
336CLEANFILES += \
337 src/ppp/ip-updown
338
339EXTRA_DIST += \
340 src/ppp/ip-updown.in
341
342INSTALL_DIRS += \
9c9d0585
SS
343 $(pppdir) \
344 $(logdir)
5ca9dc30
MT
345
346ppp-install-hook:
347 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
348 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
349 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
350 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
351 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
352
353ppp-uninstall-hook:
354 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
355 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
356
357INSTALL_EXEC_HOOKS += ppp-install-hook
358UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
359
360# ------------------------------------------------------------------------------
361
362if HAVE_SYSTEMD
363systemdsystemunit_DATA = \
67131768 364 src/systemd/firewall.service \
5ca9dc30
MT
365 src/systemd/firewall-init.service \
366 src/systemd/network-init.service \
367 src/systemd/network@.service
368
369CLEANFILES += \
370 $(systemdsystemunit_DATA)
371
372INSTALL_DIRS += \
373 $(systemdsystemunitdir)
374endif
375
376EXTRA_DIST += \
377 src/systemd/firewall4.service.in \
378 src/systemd/firewall6.service.in \
379 src/systemd/firewall-init.service.in \
380 src/systemd/network-init.service.in \
381 src/systemd/network@.service.in
382
383# ------------------------------------------------------------------------------
384
5e84cd41
MT
385systemconfig_vpndir = $(systemconfigdir)/vpn
386
387dist_systemconfig_vpn_security_policies_DATA = \
56d5efa7 388 config/vpn/security-policies/performance \
5e84cd41
MT
389 config/vpn/security-policies/system
390
391systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies
392
393# ------------------------------------------------------------------------------
394
5ca9dc30
MT
395dist_sysctl_DATA = \
396 src/sysctl/network.conf
397
398# ------------------------------------------------------------------------------
399
bae37360
MT
400dist_bashcompletion_SCRIPTS = \
401 src/bash-completion/network
402
403# ------------------------------------------------------------------------------
404
5ca9dc30 405dist_tmpfiles_DATA = \
f9dac5a0 406 src/tmpfiles/network.conf
5ca9dc30
MT
407
408# ------------------------------------------------------------------------------
409
410if HAVE_UDEV
411dist_udev_SCRIPTS = \
412 src/udev/network-hotplug \
413 src/udev/network-hotplug-rename \
414 src/udev/network-hotplug-serial
415
416dist_udevrules_DATA = \
417 src/udev/rules.d/50-serial-whitelist.rules \
418 src/udev/rules.d/60-net.rules
419
420INSTALL_DIRS += \
421 $(udevdir) \
422 $(udevrulesdir)
423endif
424
425# ------------------------------------------------------------------------------
426
01f2b2e4 427pkgconfig_DATA = \
5ca9dc30
MT
428 src/network.pc
429
430CLEANFILES += \
01f2b2e4 431 $(pkgconfig_DATA)
5ca9dc30
MT
432
433EXTRA_DIST += \
434 src/network.pc.in
435
436# ------------------------------------------------------------------------------
437
438dist_macros_DATA = \
439 src/macros/DHCP \
440 src/macros/HTTP \
441 src/macros/HTTPS \
442 src/macros/WWW
443
444# ------------------------------------------------------------------------------
445
ec3fe5b7 446INSTALL_DIRS += \
de3cecef
MT
447 $(triggersdir)
448
449# ------------------------------------------------------------------------------
450
5ca9dc30 451MANPAGES = \
2b0ff832 452 man/firewall-settings.8 \
5ca9dc30 453 man/network.8 \
5ca9dc30 454 man/network-device.8 \
427f5ae2 455 man/network-dhcp.8 \
5ca9dc30 456 man/network-dns-server.8 \
de72bd91 457 man/network-performance-tuning.8 \
7a302fa7 458 man/network-port.8 \
94eab754 459 man/network-quick-start.8 \
5ca9dc30 460 man/network-route.8 \
e023191b 461 man/network-route-static.8 \
2b0ff832 462 man/network-settings.8 \
bec94f95
MT
463 man/network-vpn.8 \
464 man/network-vpn-security-policies.8 \
5ca9dc30 465 man/network-zone.8 \
5ca9dc30
MT
466 man/network-zone-bridge.8 \
467 man/network-zone-config-pppoe-server.8 \
bd767a3e 468 man/network-zone-ip-tunnel.8 \
7a302fa7 469 man/network-zone-modem.8 \
2fb7ae4d
MT
470 man/network-zone-pppoe.8 \
471 man/network-zone-wireless.8
5ca9dc30 472
ff435238
MT
473EXTRA_DIST += \
474 man/include-color.txt \
475 man/include-description.txt
476
8f591cfc 477MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES))
d746901b
MT
478MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT))
479MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT))
5ca9dc30
MT
480
481.PHONY: man
482man: $(MANPAGES) $(MANPAGES_HTML)
483
484man_MANS = \
485 $(MANPAGES)
486
5ca9dc30
MT
487CLEANFILES += \
488 $(man_MANS) \
d746901b
MT
489 $(MANPAGES_HTML) \
490 $(MANPAGES_XML)
5ca9dc30
MT
491
492EXTRA_DIST += \
5d881996 493 man/asciidoc.conf \
a7d2fef7 494 $(MANPAGES_TXT)
5ca9dc30
MT
495
496XSLTPROC_FLAGS = \
497 --nonet \
498 --stringparam man.output.quietly 1 \
499 --stringparam funcsynopsis.style ansi \
500 --stringparam man.th.extra1.suppress 1 \
501 --stringparam man.authors.section.enabled 1 \
502 --stringparam man.copyright.section.enabled 1
503
504XSLTPROC_COMMAND_MAN = \
5d881996
MT
505 $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \
506 $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
5ca9dc30
MT
507 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
508
baf429f1 509man/%.xml: man/%.txt man/asciidoc.conf
5d881996
MT
510 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
511 $(ASCIIDOC) \
512 -f $(abs_srcdir)/man/asciidoc.conf \
baf429f1 513 -d manpage -b docbook -o $@ $<
8f591cfc 514
5ca9dc30
MT
515man/%.8: man/%.xml
516 $(XSLTPROC_COMMAND_MAN)
517
baf429f1 518man/%.html: man/%.txt man/asciidoc.conf
5d881996
MT
519 $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \
520 $(ASCIIDOC) \
521 -f $(abs_srcdir)/man/asciidoc.conf \
baf429f1 522 -b html5 -a icons -a theme=flask -o $@ $<
5ca9dc30 523
2d2e9626
MT
524.PHONY: upload-man
525upload-man: $(MANPAGES_HTML)
526 rsync -avHz --delete --progress $(MANPAGES_HTML) ms@people.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/
527
5ca9dc30
MT
528# ------------------------------------------------------------------------------
529
530substitutions = \
531 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
532 '|PACKAGE_URL=$(PACKAGE_URL)|' \
533 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
a35f416c 534 '|builddir=$(abs_builddir)|' \
5ca9dc30
MT
535 '|prefix=$(prefix)|' \
536 '|exec_prefix=$(exec_prefix)|' \
537 '|sbindir=$(sbindir)|' \
c6525a63 538 '|networkdir=$(networkdir)|' \
96275aa1 539 '|helpersdir=$(helpersdir)|' \
c4966dd6
MT
540 '|utildir=$(utildir)|' \
541 '|VIRTUAL_ENVIRONMENT_IMAGES_DIR=$(VIRTUAL_ENVIRONMENT_IMAGES_DIR)|'
5ca9dc30
MT
542
543SED_PROCESS = \
544 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
545 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
546 < $< > $@
547
3431f712 548%: %.in Makefile
5ca9dc30
MT
549 $(SED_PROCESS)
550
551INSTALL_DIRS += \
552 $(sbindir)
553
554install-exec-hook: $(INSTALL_EXEC_HOOKS)
555
556uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
557
558# - testsuite ------------------------------------------------------------------
559
560TESTS_ENVIRONMENT = \
071d3416 561 LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \
8744a476
MT
562 PATH=$(top_builddir)/src:$(PATH) \
563 functions=$(abs_builddir)/src/functions/functions \
564 networkdir=$(abs_srcdir)/src/functions \
565 testdir=$(top_srcdir)/test
566
567dist_check_DATA = \
ee86c73f
MT
568 test/constants.sh \
569 test/test-functions
5ca9dc30
MT
570
571dist_check_SCRIPTS = \
8744a476 572 $(TESTS)
5ca9dc30
MT
573
574TESTS = \
bb8304ec 575 test/load-library \
bb8304ec 576 test/functions/ip/ip_detect_protocol \
bb8304ec 577 test/functions/ip/ip_get_prefix \
8b0958b2 578 test/functions/ip/ip_net_is_valid \
b7fd8067 579 test/functions/ip/ip_is_valid \
b862734c 580 test/functions/ip/ip_network_is_subnet_of \
b7fd8067
MT
581 test/functions/ip/ip_prefix_is_valid \
582 test/functions/ip/ip_protocol_is_supported \
583 test/functions/ip/ip_split_prefix
1908d2b3
MT
584
585# - NITSI tests ----------------------------------------------------------------
586
232d01c8 587# Files for the virtual environment
c4966dd6 588VIRTUAL_ENVIRONMENT_FILES = \
232d01c8
MT
589 test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
590 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
591 test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
592 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
593 test/nitsi/virtual-environment/basic/network/network1/network.xml \
594 test/nitsi/virtual-environment/basic/network/network2/network.xml \
595 test/nitsi/virtual-environment/basic/network/network3/network.xml \
596 test/nitsi/virtual-environment/basic/network/network4/network.xml \
232d01c8
MT
597 test/nitsi/virtual-environment/basic/settings
598
c4966dd6
MT
599EXTRA_DIST += \
600 test/nitsi/virtual-environment/basic/machines/alice/machine.xml.in \
601 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml.in \
602 test/nitsi/virtual-environment/basic/machines/bob/machine.xml.in \
43d82e80
JS
603 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml.in \
604 test/nitsi/virtual-environment/basic/settings.in
c4966dd6
MT
605
606CLEANFILES += \
607 test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
608 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
609 test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
43d82e80
JS
610 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
611 test/nitsi/virtual-environment/basic/settings
c4966dd6
MT
612
613# Virtual Machine Images
614VIRTUAL_ENVIRONMENT_IMAGES = \
615 $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-alice-2.qcow2 \
616 $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-bob.qcow2
617
618DISTCLEANFILES += \
619 $(VIRTUAL_ENVIRONMENT_IMAGES)
620
621VIRTUAL_ENVIRONMENT_IMAGES_DIR = $(abs_builddir)/test/nitsi/virtual-environment/.images
622VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL = \
623 https://people.ipfire.org/~jschlag/nitsi-ipfire/virtual-environment/basic/
624
60dbefba 625NITSI_INCLUDE_RECIPES = \
fb99a6c7 626 test/nitsi/include/setup
60dbefba
JS
627
628EXTRA_DIST += \
fb99a6c7 629 test/nitsi/include/setup.in
60dbefba
JS
630
631CLEANFILES += \
fb99a6c7 632 test/nitsi/include/setup
60dbefba 633
1908d2b3 634NITSI_TESTS = \
4c769bb2 635 test/nitsi/test/make-check \
ae7a79da 636 test/nitsi/test/phase1 \
7808dbf2 637 test/nitsi/test/pppoe \
07c82cd3 638 test/nitsi/test/raw-device-get-by-mac \
9c8ff8de 639 test/nitsi/test/zone-new-bridge \
283ad5b0 640 test/nitsi/test/zone-port-attach-bridge \
8c929286
MT
641 test/nitsi/test/zone/ip-tunnel/gre6 \
642 test/nitsi/test/zone/ip-tunnel/gre4 \
60b6dd44
JS
643 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4 \
644 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6 \
645 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4 \
646 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6 \
647 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4 \
648 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6 \
87ad62bc 649 test/nitsi/test/port-vlan
1908d2b3
MT
650
651EXTRA_DIST += \
91ee6559 652 test/nitsi/test/settings.in \
a35f416c 653 test/nitsi/test/make-check/recipe.in \
07c82cd3
JS
654 test/nitsi/test/make-check/settings.in \
655 test/nitsi/test/raw-device-get-by-mac/recipe \
656 test/nitsi/test/raw-device-get-by-mac/settings.in \
657 test/nitsi/test/zone-new-bridge/recipe \
9c8ff8de
JS
658 test/nitsi/test/zone-new-bridge/settings.in \
659 test/nitsi/test/zone-port-attach-bridge/recipe \
283ad5b0 660 test/nitsi/test/zone-port-attach-bridge/settings.in \
8c929286
MT
661 test/nitsi/test/zone/ip-tunnel/gre6/recipe \
662 test/nitsi/test/zone/ip-tunnel/gre6/settings \
663 test/nitsi/test/zone/ip-tunnel/gre4/recipe \
664 test/nitsi/test/zone/ip-tunnel/gre4/settings \
60b6dd44
JS
665 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/recipe \
666 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/settings \
667 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/recipe \
668 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/settings \
669 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/recipe \
670 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/settings \
671 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/recipe \
672 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/settings \
673 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/recipe \
674 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/settings \
675 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/recipe \
676 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/settings \
677 test/nitsi/test/port-vlan/recipe \
678 test/nitsi/test/port-vlan/settings
a35f416c
MT
679
680CLEANFILES += \
91ee6559 681 test/nitsi/test/settings \
a35f416c 682 test/nitsi/test/make-check/recipe \
4c769bb2 683 test/nitsi/test/make-check/settings \
07c82cd3 684 test/nitsi/test/raw-device-get-by-mac/settings \
9c8ff8de 685 test/nitsi/test/zone-new-bridge/settings \
9b01a925 686 test/nitsi/test/zone-port-attach-bridge/settings
1908d2b3
MT
687
688NITSI_ENVIRONMENT =
689
690.PHONY: $(NITSI_TESTS)
59281a53 691$(NITSI_TESTS): % : dist %/recipe %/settings test/nitsi/test/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES) $(NITSI_INCLUDE_RECIPES)
91ee6559 692 $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@ \
e3e44ab6 693 --default-settings $(abs_builddir)/test/nitsi/test/settings --interactive-error-handling
1908d2b3
MT
694
695.PHONY: nitsi
59281a53 696nitsi: $(NITSI_TESTS)
c4966dd6
MT
697
698# Downloads a virtual image file and extracts it
699$(VIRTUAL_ENVIRONMENT_IMAGES):
700 $(AM_V_DOWNLOAD)$(MKDIR_P) $(dir $@) && \
701 $(WGET) -qO - $(VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL)/$(notdir $@).xz | xz -qd > $@