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