]>
Commit | Line | Data |
---|---|---|
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 | ||
21 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} | |
22 | AM_MAKEFLAGS = --no-print-directory | |
23 | AUTOMAKE_OPTIONS = color-tests | |
24 | ||
25 | # remove target it the command fails | |
26 | .DELETE_ON_ERROR: | |
27 | ||
28 | # keep itermediate files | |
29 | .SECONDARY: | |
30 | ||
31 | configdir = $(sysconfdir)/network | |
32 | bashcompletiondir= $(datadir)/bash-completion/completions | |
33 | libexecdir = $(prefix)/lib | |
34 | modprobedir = $(prefix)/lib/modprobe.d | |
35 | pkgconfigdir = $(libdir)/pkgconfig | |
36 | pppdir = $(sysconfdir)/ppp | |
37 | systemconfigdir = $(datadir)/network | |
38 | sysctldir = $(prefix)/lib/sysctl.d | |
39 | tmpfilesdir = $(prefix)/lib/tmpfiles.d | |
40 | udevrulesdir = $(udevdir)/rules.d | |
41 | ||
42 | networkdir = $(libexecdir)/network | |
43 | helpersdir = $(networkdir)/helpers | |
44 | ||
45 | macrosdir = $(libexecdir)/firewall/macros | |
46 | ||
47 | hooksdir = $(networkdir)/hooks | |
48 | hooks_configsdir = $(hooksdir)/configs | |
49 | hooks_portsdir = $(hooksdir)/ports | |
50 | hooks_zonesdir = $(hooksdir)/zones | |
51 | ||
52 | triggersdir = $(networkdir)/triggers | |
53 | ||
54 | logdir = $(localstatedir)/log/network | |
55 | utildir = $(networkdir) | |
56 | ||
57 | CLEANFILES = | |
58 | DISTCLEANFILES = | |
59 | EXTRA_DIST = | |
60 | INSTALL_DIRS = | |
61 | INSTALL_EXEC_HOOKS = | |
62 | TESTS = | |
63 | UNINSTALL_EXEC_HOOKS = | |
64 | noinst_DATA = | |
65 | network_PROGRAMS = | |
66 | dist_dbuspolicy_DATA = | |
67 | dist_dbussystembus_DATA = | |
68 | dist_polkitpolicy_DATA = | |
69 | systemdsystemunit_DATA = | |
70 | ||
71 | AM_CPPFLAGS = \ | |
72 | $(OUR_CPPFLAGS) \ | |
73 | -include $(top_builddir)/config.h \ | |
74 | -I${top_srcdir}/src/libnetwork | |
75 | ||
76 | AM_CFLAGS = \ | |
77 | $(OUR_CFLAGS) \ | |
78 | -fvisibility=hidden \ | |
79 | -ffunction-sections \ | |
80 | -fdata-sections | |
81 | ||
82 | AM_LDFLAGS = \ | |
83 | $(OUR_LDFLAGS) \ | |
84 | -Wl,--gc-sections \ | |
85 | -Wl,--as-needed | |
86 | ||
87 | DISTCHECK_CONFIGURE_FLAGS = \ | |
88 | --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \ | |
89 | --with-udevdir=$$dc_install_base/$(udevdir) | |
90 | ||
91 | install-directories-hook: | |
92 | $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS)) | |
93 | ||
94 | INSTALL_EXEC_HOOKS += \ | |
95 | install-directories-hook | |
96 | ||
97 | # ------------------------------------------------------------------------------ | |
98 | ||
99 | AM_V_ASCIIDOC = $(AM_V_ASCIIDOC_$(V)) | |
100 | AM_V_ASCIIDOC_ = $(AM_V_ASCIIDOC_$(AM_DEFAULT_VERBOSITY)) | |
101 | AM_V_ASCIIDOC_0 = @echo " ASCIIDOC" $@; | |
102 | ||
103 | AM_V_DOWNLOAD = $(AM_V_DOWNLOAD_$(V)) | |
104 | AM_V_DOWNLOAD_ = $(AM_V_DOWNLOAD_$(AM_DEFAULT_VERBOSITY)) | |
105 | AM_V_DOWNLOAD_0 = @echo " LOAD " $@; | |
106 | ||
107 | AM_V_NITSI = $(AM_V_NITSI_$(V)) | |
108 | AM_V_NITSI_ = $(AM_V_NITSI_$(AM_DEFAULT_VERBOSITY)) | |
109 | AM_V_NITSI_0 = @echo " NITSI " $@; | |
110 | ||
111 | AM_V_XSLT = $(AM_V_XSLT_$(V)) | |
112 | AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY)) | |
113 | AM_V_XSLT_0 = @echo " XSLT " $@; | |
114 | ||
115 | # ------------------------------------------------------------------------------ | |
116 | ||
117 | dist_doc_DATA = \ | |
118 | README \ | |
119 | docs/CODING_STYLE \ | |
120 | docs/COPYING | |
121 | ||
122 | dist_sbin_SCRIPTS = \ | |
123 | src/dhclient-script \ | |
124 | src/firewall \ | |
125 | src/network | |
126 | ||
127 | network_DATA = \ | |
128 | src/functions/functions | |
129 | ||
130 | CLEANFILES += \ | |
131 | src/functions/functions | |
132 | ||
133 | EXTRA_DIST += \ | |
134 | src/functions/functions.in | |
135 | ||
136 | dist_network_DATA = \ | |
137 | src/functions/functions.at \ | |
138 | src/functions/functions.auth \ | |
139 | src/functions/functions.bird \ | |
140 | src/functions/functions.bonding \ | |
141 | src/functions/functions.bridge \ | |
142 | src/functions/functions.cli \ | |
143 | src/functions/functions.cli.firewall \ | |
144 | src/functions/functions.colors \ | |
145 | src/functions/functions.config \ | |
146 | src/functions/functions.conntrack \ | |
147 | src/functions/functions.constants \ | |
148 | src/functions/functions.constants-firewall \ | |
149 | src/functions/functions.db \ | |
150 | src/functions/functions.description \ | |
151 | src/functions/functions.device \ | |
152 | src/functions/functions.dhclient \ | |
153 | src/functions/functions.dhcpd \ | |
154 | src/functions/functions.distro \ | |
155 | src/functions/functions.dns \ | |
156 | src/functions/functions.dummy \ | |
157 | src/functions/functions.editor \ | |
158 | src/functions/functions.firewall \ | |
159 | src/functions/functions.firewall-policy \ | |
160 | src/functions/functions.firewall-zones \ | |
161 | src/functions/functions.he \ | |
162 | src/functions/functions.hook \ | |
163 | src/functions/functions.hostapd \ | |
164 | src/functions/functions.hotplug \ | |
165 | src/functions/functions.http \ | |
166 | src/functions/functions.interrupts \ | |
167 | src/functions/functions.ip \ | |
168 | src/functions/functions.ipsec \ | |
169 | src/functions/functions.ipsec-pool \ | |
170 | src/functions/functions.iptables \ | |
171 | src/functions/functions.ip-tunnel \ | |
172 | src/functions/functions.ipv4 \ | |
173 | src/functions/functions.ipv6 \ | |
174 | src/functions/functions.leds \ | |
175 | src/functions/functions.list \ | |
176 | src/functions/functions.lock \ | |
177 | src/functions/functions.logging \ | |
178 | src/functions/functions.macros \ | |
179 | src/functions/functions.modem \ | |
180 | src/functions/functions.offloading \ | |
181 | src/functions/functions.phy \ | |
182 | src/functions/functions.ports \ | |
183 | src/functions/functions.ppp \ | |
184 | src/functions/functions.pppoe-server \ | |
185 | src/functions/functions.route \ | |
186 | src/functions/functions.routing \ | |
187 | src/functions/functions.serial \ | |
188 | src/functions/functions.service \ | |
189 | src/functions/functions.settings \ | |
190 | src/functions/functions.stp \ | |
191 | src/functions/functions.sysctl \ | |
192 | src/functions/functions.system \ | |
193 | src/functions/functions.triggers \ | |
194 | src/functions/functions.usb \ | |
195 | src/functions/functions.util \ | |
196 | src/functions/functions.vlan \ | |
197 | src/functions/functions.vpn \ | |
198 | src/functions/functions.vpn-security-policies \ | |
199 | src/functions/functions.wireless \ | |
200 | src/functions/functions.wireless-mesh \ | |
201 | src/functions/functions.wireless-networks \ | |
202 | src/functions/functions.wpa_supplicant \ | |
203 | src/functions/functions.zone \ | |
204 | src/header-config \ | |
205 | src/header-port \ | |
206 | src/header-zone | |
207 | ||
208 | dist_network_SCRIPTS = \ | |
209 | src/dhclient-helper \ | |
210 | src/ppp/dialer \ | |
211 | src/ppp/pppoe-server | |
212 | ||
213 | dist_helpers_SCRIPTS = \ | |
214 | src/helpers/dhcpd-config-helper \ | |
215 | src/helpers/hostapd-config-helper \ | |
216 | src/helpers/ipsec-updown \ | |
217 | src/helpers/pppd-angel \ | |
218 | src/helpers/wpa_supplicant | |
219 | ||
220 | bin_PROGRAMS = \ | |
221 | src/inetcalc | |
222 | ||
223 | src_inetcalc_SOURCES = \ | |
224 | src/inetcalc.c | |
225 | ||
226 | src_inetcalc_LDADD = \ | |
227 | src/libnetwork.la | |
228 | ||
229 | dist_hooks_configs_SCRIPTS = \ | |
230 | src/hooks/configs/dhcp \ | |
231 | src/hooks/configs/ipv6-auto \ | |
232 | src/hooks/configs/pppoe-server \ | |
233 | src/hooks/configs/static | |
234 | ||
235 | dist_hooks_ports_SCRIPTS = \ | |
236 | src/hooks/ports/bonding \ | |
237 | src/hooks/ports/dummy \ | |
238 | src/hooks/ports/ethernet \ | |
239 | src/hooks/ports/ip-tunnel \ | |
240 | src/hooks/ports/vlan \ | |
241 | src/hooks/ports/wireless-ap \ | |
242 | src/hooks/ports/wireless-mesh | |
243 | ||
244 | dist_hooks_zones_SCRIPTS = \ | |
245 | src/hooks/zones/bridge \ | |
246 | src/hooks/zones/ip-tunnel \ | |
247 | src/hooks/zones/modem \ | |
248 | src/hooks/zones/pppoe \ | |
249 | src/hooks/zones/wireless | |
250 | ||
251 | INSTALL_DIRS += \ | |
252 | $(configdir) \ | |
253 | $(configdir)/ports \ | |
254 | $(configdir)/vpn \ | |
255 | $(configdir)/vpn/ipsec/connections \ | |
256 | $(configdir)/vpn/security-policies \ | |
257 | $(configdir)/wireless \ | |
258 | $(configdir)/wireless/networks \ | |
259 | $(configdir)/zones | |
260 | ||
261 | # ------------------------------------------------------------------------------ | |
262 | ||
263 | LIBNETWORK_CURRENT=0 | |
264 | LIBNETWORK_REVISION=0 | |
265 | LIBNETWORK_AGE=0 | |
266 | ||
267 | pkginclude_HEADERS = \ | |
268 | src/libnetwork/network/interface.h \ | |
269 | src/libnetwork/network/libnetwork.h \ | |
270 | src/libnetwork/network/logging.h \ | |
271 | src/libnetwork/network/phy.h | |
272 | ||
273 | lib_LTLIBRARIES = \ | |
274 | src/libnetwork.la | |
275 | ||
276 | src_libnetwork_la_SOURCES = \ | |
277 | src/libnetwork/interface.c \ | |
278 | src/libnetwork/libnetwork-private.h \ | |
279 | src/libnetwork/libnetwork.c \ | |
280 | src/libnetwork/phy.c | |
281 | ||
282 | src_libnetwork_la_LIBADD = \ | |
283 | $(LIBNL_LIBS) | |
284 | ||
285 | src_libnetwork_la_CPPFLAGS = \ | |
286 | $(AM_CPPFLAGS) \ | |
287 | $(LIBNL_CPPFLAGS) \ | |
288 | -D_GNU_SOURCE \ | |
289 | -DNETWORK_PRIVATE | |
290 | ||
291 | src_libnetwork_la_CFLAGS = \ | |
292 | $(AM_CFLAGS) \ | |
293 | $(LIBNL_CFLAGS) | |
294 | ||
295 | src_libnetwork_la_LDFLAGS = \ | |
296 | $(AM_LDFLAGS) \ | |
297 | -version-info $(LIBNETWORK_CURRENT):$(LIBNETWORK_REVISION):$(LIBNETWORK_AGE) \ | |
298 | -Wl,--version-script=$(top_srcdir)/src/libnetwork/libnetwork.sym | |
299 | ||
300 | src_libnetwork_la_DEPENDENCIES = \ | |
301 | src/libnetwork/libnetwork.sym | |
302 | ||
303 | EXTRA_DIST += \ | |
304 | src/libnetwork/libnetwork.sym | |
305 | ||
306 | # ------------------------------------------------------------------------------ | |
307 | ||
308 | network_PROGRAMS += \ | |
309 | networkd | |
310 | ||
311 | dist_networkd_SOURCES = \ | |
312 | src/networkd/address.h \ | |
313 | src/networkd/bus.c \ | |
314 | src/networkd/bus.h \ | |
315 | src/networkd/config.c \ | |
316 | src/networkd/config.h \ | |
317 | src/networkd/daemon.c \ | |
318 | src/networkd/daemon.h \ | |
319 | src/networkd/daemon-bus.c \ | |
320 | src/networkd/daemon-bus.h \ | |
321 | src/networkd/devmon.c \ | |
322 | src/networkd/devmon.h \ | |
323 | src/networkd/json.h \ | |
324 | src/networkd/link.c \ | |
325 | src/networkd/link.h \ | |
326 | src/networkd/links.c \ | |
327 | src/networkd/links.h \ | |
328 | src/networkd/logging.c \ | |
329 | src/networkd/logging.h \ | |
330 | src/networkd/main.c \ | |
331 | src/networkd/ports.c \ | |
332 | src/networkd/ports.h \ | |
333 | src/networkd/port.c \ | |
334 | src/networkd/port.h \ | |
335 | src/networkd/port-bonding.c \ | |
336 | src/networkd/port-bonding.h \ | |
337 | src/networkd/port-bus.c \ | |
338 | src/networkd/port-bus.h \ | |
339 | src/networkd/port-dummy.c \ | |
340 | src/networkd/port-dummy.h \ | |
341 | src/networkd/port-ethernet.c \ | |
342 | src/networkd/port-ethernet.h \ | |
343 | src/networkd/port-veth.c \ | |
344 | src/networkd/port-veth.h \ | |
345 | src/networkd/port-vlan.c \ | |
346 | src/networkd/port-vlan.h \ | |
347 | src/networkd/stats-collector.c \ | |
348 | src/networkd/stats-collector.h \ | |
349 | src/networkd/string.h \ | |
350 | src/networkd/util.c \ | |
351 | src/networkd/util.h \ | |
352 | src/networkd/zones.c \ | |
353 | src/networkd/zones.h \ | |
354 | src/networkd/zone.c \ | |
355 | src/networkd/zone.h \ | |
356 | src/networkd/zone-bus.c \ | |
357 | src/networkd/zone-bus.h | |
358 | ||
359 | networkd_CPPFLAGS = \ | |
360 | $(AM_CPPFLAGS) \ | |
361 | -DCONFIG_DIR="\"$(configdir)\"" | |
362 | ||
363 | networkd_CFLAGS = \ | |
364 | $(AM_CFLAGS) \ | |
365 | $(CAP_CFLAGS) \ | |
366 | $(JSON_C_CFLAGS) \ | |
367 | $(SYSTEMD_CFLAGS) | |
368 | ||
369 | networkd_LDFLAGS = \ | |
370 | $(AM_LDFLAGS) | |
371 | ||
372 | networkd_LDADD = \ | |
373 | src/libnetwork.la \ | |
374 | $(CAP_LIBS) \ | |
375 | $(JSON_C_LIBS) \ | |
376 | $(SYSTEMD_LIBS) | |
377 | ||
378 | dist_dbuspolicy_DATA += \ | |
379 | src/networkd/org.ipfire.network1.conf | |
380 | ||
381 | dist_dbussystembus_DATA += \ | |
382 | src/networkd/org.ipfire.network1.service | |
383 | ||
384 | dist_polkitpolicy_DATA += \ | |
385 | src/networkd/org.ipfire.network1.policy | |
386 | ||
387 | systemdsystemunit_DATA += \ | |
388 | src/networkd/networkd.service | |
389 | ||
390 | EXTRA_DIST += \ | |
391 | src/networkd/networkd.service.in | |
392 | ||
393 | CLEANFILES += \ | |
394 | src/networkd/networkd.service | |
395 | ||
396 | # ------------------------------------------------------------------------------ | |
397 | ||
398 | bin_PROGRAMS += \ | |
399 | networkctl | |
400 | ||
401 | dist_networkctl_SOURCES = \ | |
402 | src/networkctl/command.c \ | |
403 | src/networkctl/command.h \ | |
404 | src/networkctl/main.c \ | |
405 | src/networkctl/port.c \ | |
406 | src/networkctl/port.h \ | |
407 | src/networkctl/terminal.c \ | |
408 | src/networkctl/terminal.h \ | |
409 | src/networkctl/zone.c \ | |
410 | src/networkctl/zone.h | |
411 | ||
412 | networkctl_CFLAGS = \ | |
413 | $(AM_CFLAGS) \ | |
414 | $(JSON_C_CFLAGS) \ | |
415 | $(SYSTEMD_CFLAGS) | |
416 | ||
417 | networkctl_LDFLAGS = \ | |
418 | $(AM_LDFLAGS) | |
419 | ||
420 | networkctl_LDADD = \ | |
421 | $(JSON_C_LIBS) \ | |
422 | $(SYSTEMD_LIBS) | |
423 | ||
424 | # ------------------------------------------------------------------------------ | |
425 | ||
426 | util_PROGRAMS = \ | |
427 | src/utils/network-phy-list-channels \ | |
428 | src/utils/network-phy-list-ciphers \ | |
429 | src/utils/network-phy-list-ht-caps \ | |
430 | src/utils/network-phy-list-vht-caps | |
431 | ||
432 | src_utils_network_phy_list_channels_SOURCES = \ | |
433 | src/utils/network-phy-list-channels.c | |
434 | ||
435 | src_utils_network_phy_list_channels_LDADD = \ | |
436 | src/libnetwork.la | |
437 | ||
438 | src_utils_network_phy_list_ciphers_SOURCES = \ | |
439 | src/utils/network-phy-list-ciphers.c | |
440 | ||
441 | src_utils_network_phy_list_ciphers_LDADD = \ | |
442 | src/libnetwork.la | |
443 | ||
444 | src_utils_network_phy_list_ht_caps_SOURCES = \ | |
445 | src/utils/network-phy-list-ht-caps.c | |
446 | ||
447 | src_utils_network_phy_list_ht_caps_LDADD = \ | |
448 | src/libnetwork.la | |
449 | ||
450 | src_utils_network_phy_list_vht_caps_SOURCES = \ | |
451 | src/utils/network-phy-list-vht-caps.c | |
452 | ||
453 | src_utils_network_phy_list_vht_caps_LDADD = \ | |
454 | src/libnetwork.la | |
455 | ||
456 | # ------------------------------------------------------------------------------ | |
457 | ||
458 | ppp_SCRIPTS = \ | |
459 | src/ppp/ip-updown | |
460 | ||
461 | CLEANFILES += \ | |
462 | src/ppp/ip-updown | |
463 | ||
464 | EXTRA_DIST += \ | |
465 | src/ppp/ip-updown.in | |
466 | ||
467 | INSTALL_DIRS += \ | |
468 | $(pppdir) \ | |
469 | $(logdir) | |
470 | ||
471 | ppp-install-hook: | |
472 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up | |
473 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up | |
474 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down | |
475 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up | |
476 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down | |
477 | ||
478 | ppp-uninstall-hook: | |
479 | rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up} | |
480 | rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up} | |
481 | ||
482 | INSTALL_EXEC_HOOKS += ppp-install-hook | |
483 | UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook | |
484 | ||
485 | # ------------------------------------------------------------------------------ | |
486 | ||
487 | if HAVE_SYSTEMD | |
488 | systemdsystemunit_DATA += \ | |
489 | src/systemd/firewall.service \ | |
490 | src/systemd/firewall-init.service \ | |
491 | src/systemd/network-init.service \ | |
492 | src/systemd/network@.service | |
493 | ||
494 | CLEANFILES += \ | |
495 | $(systemdsystemunit_DATA) | |
496 | ||
497 | INSTALL_DIRS += \ | |
498 | $(systemdsystemunitdir) | |
499 | endif | |
500 | ||
501 | EXTRA_DIST += \ | |
502 | src/systemd/firewall.service.in \ | |
503 | src/systemd/firewall-init.service.in \ | |
504 | src/systemd/network-init.service.in \ | |
505 | src/systemd/network@.service.in | |
506 | ||
507 | # ------------------------------------------------------------------------------ | |
508 | ||
509 | systemconfig_vpndir = $(systemconfigdir)/vpn | |
510 | ||
511 | dist_systemconfig_vpn_security_policies_DATA = \ | |
512 | config/vpn/security-policies/performance \ | |
513 | config/vpn/security-policies/system | |
514 | ||
515 | systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies | |
516 | ||
517 | # ------------------------------------------------------------------------------ | |
518 | ||
519 | dist_sysctl_DATA = \ | |
520 | src/sysctl/network.conf | |
521 | ||
522 | # ------------------------------------------------------------------------------ | |
523 | ||
524 | dist_modprobe_DATA = \ | |
525 | src/modprobe.d/no-copybreak.conf | |
526 | ||
527 | # ------------------------------------------------------------------------------ | |
528 | ||
529 | dist_bashcompletion_SCRIPTS = \ | |
530 | src/bash-completion/network | |
531 | ||
532 | # ------------------------------------------------------------------------------ | |
533 | ||
534 | dist_tmpfiles_DATA = \ | |
535 | src/tmpfiles/network.conf | |
536 | ||
537 | # ------------------------------------------------------------------------------ | |
538 | ||
539 | if HAVE_UDEV | |
540 | dist_udev_SCRIPTS = \ | |
541 | src/udev/network-hotplug \ | |
542 | src/udev/network-hotplug-rename \ | |
543 | src/udev/network-hotplug-serial | |
544 | ||
545 | dist_udevrules_DATA = \ | |
546 | src/udev/rules.d/50-serial-whitelist.rules \ | |
547 | src/udev/rules.d/60-net.rules | |
548 | ||
549 | INSTALL_DIRS += \ | |
550 | $(udevdir) \ | |
551 | $(udevrulesdir) | |
552 | endif | |
553 | ||
554 | # ------------------------------------------------------------------------------ | |
555 | ||
556 | pkgconfig_DATA = \ | |
557 | src/network.pc | |
558 | ||
559 | CLEANFILES += \ | |
560 | $(pkgconfig_DATA) | |
561 | ||
562 | EXTRA_DIST += \ | |
563 | src/network.pc.in | |
564 | ||
565 | # ------------------------------------------------------------------------------ | |
566 | ||
567 | dist_macros_DATA = \ | |
568 | src/macros/DHCP \ | |
569 | src/macros/HTTP \ | |
570 | src/macros/HTTPS \ | |
571 | src/macros/WWW | |
572 | ||
573 | # ------------------------------------------------------------------------------ | |
574 | ||
575 | INSTALL_DIRS += \ | |
576 | $(triggersdir) | |
577 | ||
578 | # ------------------------------------------------------------------------------ | |
579 | ||
580 | MANPAGES = \ | |
581 | man/firewall-settings.8 \ | |
582 | man/network.8 \ | |
583 | man/network-device.8 \ | |
584 | man/network-dhcp.8 \ | |
585 | man/network-dns-server.8 \ | |
586 | man/network-performance-tuning.8 \ | |
587 | man/network-port.8 \ | |
588 | man/network-quick-start.8 \ | |
589 | man/network-route.8 \ | |
590 | man/network-route-static.8 \ | |
591 | man/network-settings.8 \ | |
592 | man/network-vpn.8 \ | |
593 | man/network-vpn-ipsec.8 \ | |
594 | man/network-vpn-security-policies.8 \ | |
595 | man/network-zone.8 \ | |
596 | man/network-zone-bridge.8 \ | |
597 | man/network-zone-config-pppoe-server.8 \ | |
598 | man/network-zone-ip-tunnel.8 \ | |
599 | man/network-zone-modem.8 \ | |
600 | man/network-zone-pppoe.8 \ | |
601 | man/network-zone-wireless.8 | |
602 | ||
603 | EXTRA_DIST += \ | |
604 | man/include-color.txt \ | |
605 | man/include-description.txt | |
606 | ||
607 | MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES)) | |
608 | MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT)) | |
609 | MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT)) | |
610 | ||
611 | .PHONY: man | |
612 | man: $(MANPAGES) $(MANPAGES_HTML) | |
613 | ||
614 | if ENABLE_MANPAGES | |
615 | man_MANS = \ | |
616 | $(MANPAGES) | |
617 | endif | |
618 | ||
619 | CLEANFILES += \ | |
620 | $(MANPAGES) \ | |
621 | $(MANPAGES_HTML) \ | |
622 | $(MANPAGES_XML) | |
623 | ||
624 | EXTRA_DIST += \ | |
625 | man/asciidoc.conf \ | |
626 | $(MANPAGES_TXT) | |
627 | ||
628 | XSLTPROC_FLAGS = \ | |
629 | --nonet \ | |
630 | --stringparam man.output.quietly 1 \ | |
631 | --stringparam funcsynopsis.style ansi \ | |
632 | --stringparam man.th.extra1.suppress 1 \ | |
633 | --stringparam man.authors.section.enabled 1 \ | |
634 | --stringparam man.copyright.section.enabled 1 | |
635 | ||
636 | XSLTPROC_COMMAND_MAN = \ | |
637 | $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \ | |
638 | $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ | |
639 | http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< | |
640 | ||
641 | man/%.xml: man/%.txt man/asciidoc.conf | |
642 | $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \ | |
643 | $(ASCIIDOC) \ | |
644 | -f $(abs_srcdir)/man/asciidoc.conf \ | |
645 | -d manpage -b docbook -o $@ $< | |
646 | ||
647 | man/%.8: man/%.xml | |
648 | $(XSLTPROC_COMMAND_MAN) | |
649 | ||
650 | man/%.html: man/%.txt man/asciidoc.conf | |
651 | $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \ | |
652 | $(ASCIIDOC) \ | |
653 | -f $(abs_srcdir)/man/asciidoc.conf \ | |
654 | -b html5 -a icons -a theme=flask -o $@ $< | |
655 | ||
656 | .PHONY: upload-man | |
657 | upload-man: $(MANPAGES_HTML) | |
658 | rsync -avHz --delete --progress $(MANPAGES_HTML) ms@people.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/ | |
659 | ||
660 | # ------------------------------------------------------------------------------ | |
661 | ||
662 | substitutions = \ | |
663 | '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ | |
664 | '|PACKAGE_URL=$(PACKAGE_URL)|' \ | |
665 | '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ | |
666 | '|builddir=$(abs_builddir)|' \ | |
667 | '|prefix=$(prefix)|' \ | |
668 | '|exec_prefix=$(exec_prefix)|' \ | |
669 | '|bindir=$(bindir)|' \ | |
670 | '|sbindir=$(sbindir)|' \ | |
671 | '|networkdir=$(networkdir)|' \ | |
672 | '|helpersdir=$(helpersdir)|' \ | |
673 | '|utildir=$(utildir)|' \ | |
674 | '|VIRTUAL_ENVIRONMENT_IMAGES_DIR=$(VIRTUAL_ENVIRONMENT_IMAGES_DIR)|' | |
675 | ||
676 | SED_PROCESS = \ | |
677 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
678 | $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ | |
679 | < $< > $@ | |
680 | ||
681 | %: %.in Makefile | |
682 | $(SED_PROCESS) | |
683 | ||
684 | INSTALL_DIRS += \ | |
685 | $(sbindir) | |
686 | ||
687 | install-exec-hook: $(INSTALL_EXEC_HOOKS) | |
688 | ||
689 | uninstall-hook: $(UNINSTALL_EXEC_HOOKS) | |
690 | ||
691 | # - testsuite ------------------------------------------------------------------ | |
692 | ||
693 | TESTS_ENVIRONMENT = \ | |
694 | LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \ | |
695 | PATH=$(top_builddir)/src:$(PATH) \ | |
696 | functions=$(abs_builddir)/src/functions/functions \ | |
697 | networkdir=$(abs_srcdir)/src/functions \ | |
698 | testdir=$(top_srcdir)/test | |
699 | ||
700 | dist_check_DATA = \ | |
701 | test/constants.sh \ | |
702 | test/test-functions \ | |
703 | test/networkd/test.sh | |
704 | ||
705 | dist_check_SCRIPTS = \ | |
706 | test/load-library \ | |
707 | test/functions/ip/ip_detect_protocol \ | |
708 | test/functions/ip/ip_get_prefix \ | |
709 | test/functions/ip/ip_net_is_valid \ | |
710 | test/functions/ip/ip_is_valid \ | |
711 | test/functions/ip/ip_network_is_subnet_of \ | |
712 | test/functions/ip/ip_prefix_is_valid \ | |
713 | test/functions/ip/ip_protocol_is_supported \ | |
714 | test/functions/ip/ip_split_prefix | |
715 | ||
716 | TESTS += $(dist_check_SCRIPTS) | |
717 | ||
718 | TEST_EXTENSIONS = .t | |
719 | ||
720 | NETWORKD_TESTS = \ | |
721 | test/networkd/00_launch.t \ | |
722 | test/networkd/01_dummy.t | |
723 | ||
724 | TESTS += $(NETWORKD_TESTS) | |
725 | ||
726 | EXTRA_DIST += \ | |
727 | test/networkd/test.sh \ | |
728 | $(NETWORKD_TESTS) | |
729 | ||
730 | # Run all networkd tests in their own namespaces | |
731 | T_LOG_COMPILER = unshare --net --ipc --uts --user --cgroup --time --pid --fork \ | |
732 | --map-root-user --keep-caps $(SHELL) test/networkd/test.sh | |
733 | ||
734 | # - NITSI tests ---------------------------------------------------------------- | |
735 | ||
736 | # Files for the virtual environment | |
737 | VIRTUAL_ENVIRONMENT_FILES = \ | |
738 | test/nitsi/virtual-environment/basic/machines/alice/machine.xml \ | |
739 | test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \ | |
740 | test/nitsi/virtual-environment/basic/machines/bob/machine.xml \ | |
741 | test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \ | |
742 | test/nitsi/virtual-environment/basic/network/network1/network.xml \ | |
743 | test/nitsi/virtual-environment/basic/network/network2/network.xml \ | |
744 | test/nitsi/virtual-environment/basic/network/network3/network.xml \ | |
745 | test/nitsi/virtual-environment/basic/network/network4/network.xml \ | |
746 | test/nitsi/virtual-environment/basic/settings | |
747 | ||
748 | EXTRA_DIST += \ | |
749 | test/nitsi/virtual-environment/basic/machines/alice/machine.xml.in \ | |
750 | test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml.in \ | |
751 | test/nitsi/virtual-environment/basic/machines/bob/machine.xml.in \ | |
752 | test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml.in \ | |
753 | test/nitsi/virtual-environment/basic/settings.in | |
754 | ||
755 | CLEANFILES += \ | |
756 | test/nitsi/virtual-environment/basic/machines/alice/machine.xml \ | |
757 | test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \ | |
758 | test/nitsi/virtual-environment/basic/machines/bob/machine.xml \ | |
759 | test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \ | |
760 | test/nitsi/virtual-environment/basic/settings | |
761 | ||
762 | # Virtual Machine Images | |
763 | VIRTUAL_ENVIRONMENT_IMAGES = \ | |
764 | $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-alice-2.qcow2 \ | |
765 | $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-bob.qcow2 | |
766 | ||
767 | DISTCLEANFILES += \ | |
768 | $(VIRTUAL_ENVIRONMENT_IMAGES) | |
769 | ||
770 | VIRTUAL_ENVIRONMENT_IMAGES_DIR = $(abs_builddir)/test/nitsi/virtual-environment/.images | |
771 | VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL = \ | |
772 | https://people.ipfire.org/~jschlag/nitsi-ipfire/virtual-environment/basic/ | |
773 | ||
774 | NITSI_INCLUDE_RECIPES = \ | |
775 | test/nitsi/include/setup | |
776 | ||
777 | EXTRA_DIST += \ | |
778 | test/nitsi/include/setup.in | |
779 | ||
780 | CLEANFILES += \ | |
781 | test/nitsi/include/setup | |
782 | ||
783 | NITSI_TESTS = \ | |
784 | test/nitsi/test/make-check \ | |
785 | test/nitsi/test/phase1 \ | |
786 | test/nitsi/test/pppoe \ | |
787 | test/nitsi/test/raw-device-get-by-mac \ | |
788 | test/nitsi/test/zone-new-bridge \ | |
789 | test/nitsi/test/zone-port-attach-bridge \ | |
790 | test/nitsi/test/zone/ip-tunnel/gre6 \ | |
791 | test/nitsi/test/zone/ip-tunnel/gre4 \ | |
792 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4 \ | |
793 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6 \ | |
794 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4 \ | |
795 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6 \ | |
796 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4 \ | |
797 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6 \ | |
798 | test/nitsi/test/port-vlan | |
799 | ||
800 | EXTRA_DIST += \ | |
801 | test/nitsi/test/settings.in \ | |
802 | test/nitsi/test/make-check/recipe.in \ | |
803 | test/nitsi/test/make-check/settings.in \ | |
804 | test/nitsi/test/raw-device-get-by-mac/recipe \ | |
805 | test/nitsi/test/raw-device-get-by-mac/settings.in \ | |
806 | test/nitsi/test/zone-new-bridge/recipe \ | |
807 | test/nitsi/test/zone-new-bridge/settings.in \ | |
808 | test/nitsi/test/zone-port-attach-bridge/recipe \ | |
809 | test/nitsi/test/zone-port-attach-bridge/settings.in \ | |
810 | test/nitsi/test/zone/ip-tunnel/gre6/recipe \ | |
811 | test/nitsi/test/zone/ip-tunnel/gre6/settings \ | |
812 | test/nitsi/test/zone/ip-tunnel/gre4/recipe \ | |
813 | test/nitsi/test/zone/ip-tunnel/gre4/settings \ | |
814 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/recipe \ | |
815 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/settings \ | |
816 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/recipe \ | |
817 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/settings \ | |
818 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/recipe \ | |
819 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/settings \ | |
820 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/recipe \ | |
821 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/settings \ | |
822 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/recipe \ | |
823 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/settings \ | |
824 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/recipe \ | |
825 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/settings \ | |
826 | test/nitsi/test/port-vlan/recipe \ | |
827 | test/nitsi/test/port-vlan/settings | |
828 | ||
829 | CLEANFILES += \ | |
830 | test/nitsi/test/settings \ | |
831 | test/nitsi/test/make-check/recipe \ | |
832 | test/nitsi/test/make-check/settings \ | |
833 | test/nitsi/test/raw-device-get-by-mac/settings \ | |
834 | test/nitsi/test/zone-new-bridge/settings \ | |
835 | test/nitsi/test/zone-port-attach-bridge/settings | |
836 | ||
837 | NITSI_ENVIRONMENT = | |
838 | ||
839 | .PHONY: $(NITSI_TESTS) | |
840 | $(NITSI_TESTS): % : dist %/recipe %/settings test/nitsi/test/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES) $(NITSI_INCLUDE_RECIPES) | |
841 | $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@ \ | |
842 | --default-settings $(abs_builddir)/test/nitsi/test/settings --interactive-error-handling | |
843 | ||
844 | .PHONY: nitsi | |
845 | nitsi: $(NITSI_TESTS) | |
846 | ||
847 | # Downloads a virtual image file and extracts it | |
848 | $(VIRTUAL_ENVIRONMENT_IMAGES): | |
849 | $(AM_V_DOWNLOAD)$(MKDIR_P) $(dir $@) && \ | |
850 | $(WGET) -qO - $(VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL)/$(notdir $@).xz | xz -qd > $@ |