]> git.ipfire.org Git - people/ms/network.git/blame - Makefile.am
Drop code for radvd
[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 \
5ca9dc30
MT
176 src/functions/functions.route \
177 src/functions/functions.routing \
178 src/functions/functions.serial \
179 src/functions/functions.service \
e9df08ad 180 src/functions/functions.settings \
5ca9dc30 181 src/functions/functions.stp \
5ca9dc30 182 src/functions/functions.sysctl \
de72bd91 183 src/functions/functions.system \
de3cecef 184 src/functions/functions.triggers \
5ca9dc30
MT
185 src/functions/functions.usb \
186 src/functions/functions.util \
187 src/functions/functions.vlan \
2da98f56 188 src/functions/functions.vpn \
3eae7bed 189 src/functions/functions.vpn-security-policies \
5ca9dc30 190 src/functions/functions.wireless \
81bf9898 191 src/functions/functions.wireless-mesh \
49958b8c 192 src/functions/functions.wireless-networks \
5ca9dc30
MT
193 src/functions/functions.wpa_supplicant \
194 src/functions/functions.zone \
5ca9dc30
MT
195 src/header-config \
196 src/header-port \
f9217f83 197 src/header-zone
5ca9dc30 198
b719b3f7 199dist_network_SCRIPTS = \
f9217f83
MT
200 src/dhclient-helper \
201 src/ppp/dialer \
202 src/ppp/pppoe-server
b719b3f7 203
5ca9dc30 204dist_helpers_SCRIPTS = \
5ca9dc30
MT
205 src/helpers/dhcpd-config-helper \
206 src/helpers/firewall-kernel-init \
207 src/helpers/hostapd-config-helper \
67baa452 208 src/helpers/ipsec-updown \
5ca9dc30 209 src/helpers/pppd-angel \
02807ad2 210 src/helpers/wpa_supplicant
5ca9dc30 211
13a6e69f
MT
212bin_PROGRAMS = \
213 src/inetcalc
214
215src_inetcalc_SOURCES = \
216 src/inetcalc.c
217
01f2b2e4
MT
218src_inetcalc_LDADD = \
219 src/libnetwork.la
220
7d2cb6d3 221dist_hooks_configs_SCRIPTS = \
9353a4e4 222 src/hooks/configs/dhcp \
b73e9d43 223 src/hooks/configs/ipv6-auto \
46a28dcd
MT
224 src/hooks/configs/pppoe-server \
225 src/hooks/configs/static
7d2cb6d3 226
5ca9dc30 227dist_hooks_ports_SCRIPTS = \
5ca9dc30
MT
228 src/hooks/ports/bonding \
229 src/hooks/ports/dummy \
230 src/hooks/ports/ethernet \
8032884d 231 src/hooks/ports/ip-tunnel \
5ca9dc30 232 src/hooks/ports/vlan \
727248f0
MT
233 src/hooks/ports/wireless-ap \
234 src/hooks/ports/wireless-mesh
5ca9dc30
MT
235
236dist_hooks_zones_SCRIPTS = \
5ca9dc30 237 src/hooks/zones/bridge \
85de251d 238 src/hooks/zones/ip-tunnel \
5ca9dc30
MT
239 src/hooks/zones/modem \
240 src/hooks/zones/pppoe \
5ca9dc30
MT
241 src/hooks/zones/wireless
242
f166708b
MT
243INSTALL_DIRS += \
244 $(configdir) \
245 $(configdir)/ports \
246 $(configdir)/vpn \
247 $(configdir)/vpn/ipsec/connections \
248 $(configdir)/vpn/security-policies \
249 $(configdir)/wireless \
250 $(configdir)/wireless/networks \
251 $(configdir)/zones
252
5ca9dc30
MT
253# ------------------------------------------------------------------------------
254
01f2b2e4
MT
255LIBNETWORK_CURRENT=0
256LIBNETWORK_REVISION=0
257LIBNETWORK_AGE=0
258
259pkginclude_HEADERS = \
248629ae 260 src/libnetwork/network/interface.h \
6f4814db 261 src/libnetwork/network/libnetwork.h \
9cb2f0c0
MT
262 src/libnetwork/network/logging.h \
263 src/libnetwork/network/phy.h
01f2b2e4
MT
264
265lib_LTLIBRARIES = \
266 src/libnetwork.la
267
268src_libnetwork_la_SOURCES = \
248629ae 269 src/libnetwork/interface.c \
01f2b2e4 270 src/libnetwork/libnetwork-private.h \
9cb2f0c0
MT
271 src/libnetwork/libnetwork.c \
272 src/libnetwork/phy.c
01f2b2e4 273
db0a2d76
MT
274src_libnetwork_la_LIBADD = \
275 $(LIBNL_LIBS)
276
6f4814db
MT
277src_libnetwork_la_CPPFLAGS = \
278 $(AM_CPPFLAGS) \
db0a2d76 279 $(LIBNL_CPPFLAGS) \
6f4814db
MT
280 -D_GNU_SOURCE \
281 -DNETWORK_PRIVATE
282
db0a2d76
MT
283src_libnetwork_la_CFLAGS = \
284 $(AM_CFLAGS) \
285 $(LIBNL_CFLAGS)
286
01f2b2e4
MT
287src_libnetwork_la_LDFLAGS = \
288 $(AM_LDFLAGS) \
289 -version-info $(LIBNETWORK_CURRENT):$(LIBNETWORK_REVISION):$(LIBNETWORK_AGE) \
290 -Wl,--version-script=$(top_srcdir)/src/libnetwork/libnetwork.sym
291
292src_libnetwork_la_DEPENDENCIES = \
293 src/libnetwork/libnetwork.sym
294
295EXTRA_DIST += \
296 src/libnetwork/libnetwork.sym
297
298# ------------------------------------------------------------------------------
e145b2f3
MT
299
300util_PROGRAMS = \
394cff53 301 src/utils/network-phy-list-channels \
2e4e3c88 302 src/utils/network-phy-list-ciphers \
b2323e58
MT
303 src/utils/network-phy-list-ht-caps \
304 src/utils/network-phy-list-vht-caps
e145b2f3 305
394cff53
MT
306src_utils_network_phy_list_channels_SOURCES = \
307 src/utils/network-phy-list-channels.c
308
309src_utils_network_phy_list_channels_LDADD = \
310 src/libnetwork.la
311
2e4e3c88
MT
312src_utils_network_phy_list_ciphers_SOURCES = \
313 src/utils/network-phy-list-ciphers.c
314
315src_utils_network_phy_list_ciphers_LDADD = \
316 src/libnetwork.la
317
e145b2f3
MT
318src_utils_network_phy_list_ht_caps_SOURCES = \
319 src/utils/network-phy-list-ht-caps.c
320
321src_utils_network_phy_list_ht_caps_LDADD = \
322 src/libnetwork.la
323
b2323e58
MT
324src_utils_network_phy_list_vht_caps_SOURCES = \
325 src/utils/network-phy-list-vht-caps.c
326
327src_utils_network_phy_list_vht_caps_LDADD = \
328 src/libnetwork.la
329
e145b2f3 330# ------------------------------------------------------------------------------
01f2b2e4 331
5ca9dc30
MT
332ppp_SCRIPTS = \
333 src/ppp/ip-updown
334
335CLEANFILES += \
336 src/ppp/ip-updown
337
338EXTRA_DIST += \
339 src/ppp/ip-updown.in
340
341INSTALL_DIRS += \
9c9d0585
SS
342 $(pppdir) \
343 $(logdir)
5ca9dc30
MT
344
345ppp-install-hook:
346 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
347 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
348 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
349 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
350 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
351
352ppp-uninstall-hook:
353 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
354 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
355
356INSTALL_EXEC_HOOKS += ppp-install-hook
357UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
358
359# ------------------------------------------------------------------------------
360
361if HAVE_SYSTEMD
362systemdsystemunit_DATA = \
363 src/systemd/firewall4.service \
364 src/systemd/firewall6.service \
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 \
89c81bcf 454 man/network-color.8 \
6135a5b3 455 man/network-description.8 \
5ca9dc30 456 man/network-device.8 \
427f5ae2 457 man/network-dhcp.8 \
5ca9dc30 458 man/network-dns-server.8 \
de72bd91 459 man/network-performance-tuning.8 \
7a302fa7 460 man/network-port.8 \
94eab754 461 man/network-quick-start.8 \
5ca9dc30 462 man/network-route.8 \
e023191b 463 man/network-route-static.8 \
2b0ff832 464 man/network-settings.8 \
bec94f95
MT
465 man/network-vpn.8 \
466 man/network-vpn-security-policies.8 \
5ca9dc30 467 man/network-zone.8 \
5ca9dc30
MT
468 man/network-zone-bridge.8 \
469 man/network-zone-config-pppoe-server.8 \
bd767a3e 470 man/network-zone-ip-tunnel.8 \
7a302fa7 471 man/network-zone-modem.8 \
2fb7ae4d
MT
472 man/network-zone-pppoe.8 \
473 man/network-zone-wireless.8
5ca9dc30
MT
474
475MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
476MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
477
478.PHONY: man
479man: $(MANPAGES) $(MANPAGES_HTML)
480
481man_MANS = \
482 $(MANPAGES)
483
484noinst_DATA += \
485 $(MANPAGES_HTML)
486
487CLEANFILES += \
488 $(man_MANS) \
489 $(MANPAGES_HTML)
490
491EXTRA_DIST += \
492 $(MANPAGES_XML) \
493 man/custom-html.xsl
494
495XSLTPROC_FLAGS = \
496 --nonet \
497 --stringparam man.output.quietly 1 \
498 --stringparam funcsynopsis.style ansi \
499 --stringparam man.th.extra1.suppress 1 \
500 --stringparam man.authors.section.enabled 1 \
501 --stringparam man.copyright.section.enabled 1
502
503XSLTPROC_COMMAND_MAN = \
504 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
505 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
506
507XSLTPROC_COMMAND_HTML = \
508 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
509
510man/%.8: man/%.xml
511 $(XSLTPROC_COMMAND_MAN)
512
513man/%.html: man/%.xml man/custom-html.xsl
514 $(XSLTPROC_COMMAND_HTML)
515
516# ------------------------------------------------------------------------------
517
518substitutions = \
519 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
520 '|PACKAGE_URL=$(PACKAGE_URL)|' \
521 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
a35f416c 522 '|builddir=$(abs_builddir)|' \
5ca9dc30
MT
523 '|prefix=$(prefix)|' \
524 '|exec_prefix=$(exec_prefix)|' \
525 '|sbindir=$(sbindir)|' \
c6525a63 526 '|networkdir=$(networkdir)|' \
96275aa1 527 '|helpersdir=$(helpersdir)|' \
c4966dd6
MT
528 '|utildir=$(utildir)|' \
529 '|VIRTUAL_ENVIRONMENT_IMAGES_DIR=$(VIRTUAL_ENVIRONMENT_IMAGES_DIR)|'
5ca9dc30
MT
530
531SED_PROCESS = \
532 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
533 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
534 < $< > $@
535
3431f712 536%: %.in Makefile
5ca9dc30
MT
537 $(SED_PROCESS)
538
539INSTALL_DIRS += \
540 $(sbindir)
541
542install-exec-hook: $(INSTALL_EXEC_HOOKS)
543
544uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
545
546# - testsuite ------------------------------------------------------------------
547
548TESTS_ENVIRONMENT = \
071d3416 549 LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \
8744a476
MT
550 PATH=$(top_builddir)/src:$(PATH) \
551 functions=$(abs_builddir)/src/functions/functions \
552 networkdir=$(abs_srcdir)/src/functions \
553 testdir=$(top_srcdir)/test
554
555dist_check_DATA = \
ee86c73f
MT
556 test/constants.sh \
557 test/test-functions
5ca9dc30
MT
558
559dist_check_SCRIPTS = \
8744a476 560 $(TESTS)
5ca9dc30
MT
561
562TESTS = \
bb8304ec 563 test/load-library \
bb8304ec 564 test/functions/ip/ip_detect_protocol \
bb8304ec 565 test/functions/ip/ip_get_prefix \
8b0958b2 566 test/functions/ip/ip_net_is_valid \
b7fd8067 567 test/functions/ip/ip_is_valid \
b862734c 568 test/functions/ip/ip_network_is_subnet_of \
b7fd8067
MT
569 test/functions/ip/ip_prefix_is_valid \
570 test/functions/ip/ip_protocol_is_supported \
571 test/functions/ip/ip_split_prefix
1908d2b3
MT
572
573# - NITSI tests ----------------------------------------------------------------
574
232d01c8 575# Files for the virtual environment
c4966dd6 576VIRTUAL_ENVIRONMENT_FILES = \
232d01c8
MT
577 test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
578 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
579 test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
580 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
581 test/nitsi/virtual-environment/basic/network/network1/network.xml \
582 test/nitsi/virtual-environment/basic/network/network2/network.xml \
583 test/nitsi/virtual-environment/basic/network/network3/network.xml \
584 test/nitsi/virtual-environment/basic/network/network4/network.xml \
232d01c8
MT
585 test/nitsi/virtual-environment/basic/settings
586
c4966dd6
MT
587EXTRA_DIST += \
588 test/nitsi/virtual-environment/basic/machines/alice/machine.xml.in \
589 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml.in \
590 test/nitsi/virtual-environment/basic/machines/bob/machine.xml.in \
43d82e80
JS
591 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml.in \
592 test/nitsi/virtual-environment/basic/settings.in
c4966dd6
MT
593
594CLEANFILES += \
595 test/nitsi/virtual-environment/basic/machines/alice/machine.xml \
596 test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \
597 test/nitsi/virtual-environment/basic/machines/bob/machine.xml \
43d82e80
JS
598 test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \
599 test/nitsi/virtual-environment/basic/settings
c4966dd6
MT
600
601# Virtual Machine Images
602VIRTUAL_ENVIRONMENT_IMAGES = \
603 $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-alice-2.qcow2 \
604 $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-bob.qcow2
605
606DISTCLEANFILES += \
607 $(VIRTUAL_ENVIRONMENT_IMAGES)
608
609VIRTUAL_ENVIRONMENT_IMAGES_DIR = $(abs_builddir)/test/nitsi/virtual-environment/.images
610VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL = \
611 https://people.ipfire.org/~jschlag/nitsi-ipfire/virtual-environment/basic/
612
60dbefba 613NITSI_INCLUDE_RECIPES = \
fb99a6c7 614 test/nitsi/include/setup
60dbefba
JS
615
616EXTRA_DIST += \
fb99a6c7 617 test/nitsi/include/setup.in
60dbefba
JS
618
619CLEANFILES += \
fb99a6c7 620 test/nitsi/include/setup
60dbefba 621
1908d2b3 622NITSI_TESTS = \
4c769bb2 623 test/nitsi/test/make-check \
ae7a79da 624 test/nitsi/test/phase1 \
7808dbf2 625 test/nitsi/test/pppoe \
07c82cd3 626 test/nitsi/test/raw-device-get-by-mac \
9c8ff8de 627 test/nitsi/test/zone-new-bridge \
283ad5b0 628 test/nitsi/test/zone-port-attach-bridge \
8c929286
MT
629 test/nitsi/test/zone/ip-tunnel/gre6 \
630 test/nitsi/test/zone/ip-tunnel/gre4 \
60b6dd44
JS
631 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4 \
632 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6 \
633 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4 \
634 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6 \
635 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4 \
636 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6 \
87ad62bc 637 test/nitsi/test/port-vlan
1908d2b3
MT
638
639EXTRA_DIST += \
91ee6559 640 test/nitsi/test/settings.in \
a35f416c 641 test/nitsi/test/make-check/recipe.in \
07c82cd3
JS
642 test/nitsi/test/make-check/settings.in \
643 test/nitsi/test/raw-device-get-by-mac/recipe \
644 test/nitsi/test/raw-device-get-by-mac/settings.in \
645 test/nitsi/test/zone-new-bridge/recipe \
9c8ff8de
JS
646 test/nitsi/test/zone-new-bridge/settings.in \
647 test/nitsi/test/zone-port-attach-bridge/recipe \
283ad5b0 648 test/nitsi/test/zone-port-attach-bridge/settings.in \
8c929286
MT
649 test/nitsi/test/zone/ip-tunnel/gre6/recipe \
650 test/nitsi/test/zone/ip-tunnel/gre6/settings \
651 test/nitsi/test/zone/ip-tunnel/gre4/recipe \
652 test/nitsi/test/zone/ip-tunnel/gre4/settings \
60b6dd44
JS
653 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/recipe \
654 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/settings \
655 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/recipe \
656 test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/settings \
657 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/recipe \
658 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/settings \
659 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/recipe \
660 test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/settings \
661 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/recipe \
662 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/settings \
663 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/recipe \
664 test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/settings \
665 test/nitsi/test/port-vlan/recipe \
666 test/nitsi/test/port-vlan/settings
a35f416c
MT
667
668CLEANFILES += \
91ee6559 669 test/nitsi/test/settings \
a35f416c 670 test/nitsi/test/make-check/recipe \
4c769bb2 671 test/nitsi/test/make-check/settings \
07c82cd3 672 test/nitsi/test/raw-device-get-by-mac/settings \
9c8ff8de 673 test/nitsi/test/zone-new-bridge/settings \
9b01a925 674 test/nitsi/test/zone-port-attach-bridge/settings
1908d2b3
MT
675
676NITSI_ENVIRONMENT =
677
678.PHONY: $(NITSI_TESTS)
59281a53 679$(NITSI_TESTS): % : dist %/recipe %/settings test/nitsi/test/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES) $(NITSI_INCLUDE_RECIPES)
91ee6559 680 $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@ \
e3e44ab6 681 --default-settings $(abs_builddir)/test/nitsi/test/settings --interactive-error-handling
1908d2b3
MT
682
683.PHONY: nitsi
59281a53 684nitsi: $(NITSI_TESTS)
c4966dd6
MT
685
686# Downloads a virtual image file and extracts it
687$(VIRTUAL_ENVIRONMENT_IMAGES):
688 $(AM_V_DOWNLOAD)$(MKDIR_P) $(dir $@) && \
689 $(WGET) -qO - $(VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL)/$(notdir $@).xz | xz -qd > $@