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