]>
Commit | Line | Data |
---|---|---|
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 | ||
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 | ||
f166708b | 31 | configdir = $(sysconfdir)/network |
bae37360 | 32 | bashcompletiondir= $(datadir)/bash-completion/completions |
5ca9dc30 | 33 | libexecdir = $(prefix)/lib |
ea4abb82 | 34 | modprobedir = $(prefix)/lib/modprobe.d |
01f2b2e4 | 35 | pkgconfigdir = $(libdir)/pkgconfig |
5ca9dc30 | 36 | pppdir = $(sysconfdir)/ppp |
5e84cd41 | 37 | systemconfigdir = $(datadir)/network |
5ca9dc30 MT |
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 | |
7d2cb6d3 | 48 | hooks_configsdir = $(hooksdir)/configs |
5ca9dc30 MT |
49 | hooks_portsdir = $(hooksdir)/ports |
50 | hooks_zonesdir = $(hooksdir)/zones | |
51 | ||
de3cecef MT |
52 | triggersdir = $(networkdir)/triggers |
53 | ||
9c9d0585 | 54 | logdir = $(localestatedir)/log/network |
e145b2f3 | 55 | utildir = $(networkdir) |
9c9d0585 | 56 | |
5ca9dc30 MT |
57 | CLEANFILES = |
58 | DISTCLEANFILES = | |
59 | EXTRA_DIST = | |
60 | INSTALL_DIRS = | |
61 | INSTALL_EXEC_HOOKS = | |
c920185e | 62 | TESTS = |
5ca9dc30 MT |
63 | UNINSTALL_EXEC_HOOKS = |
64 | noinst_DATA = | |
ac0188ee | 65 | network_PROGRAMS = |
d5fab986 MT |
66 | dist_dbuspolicy_DATA = |
67 | dist_dbussystembus_DATA = | |
bf98bd65 | 68 | dist_polkitpolicy_DATA = |
5d968c01 | 69 | systemdsystemunit_DATA = |
5ca9dc30 | 70 | |
01f2b2e4 MT |
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 | |
e708653f | 86 | |
5ca9dc30 MT |
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 | ||
8f591cfc MT |
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 | ||
c4966dd6 MT |
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 | ||
1908d2b3 MT |
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 | ||
5ca9dc30 MT |
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 = \ | |
1337eee2 | 118 | README \ |
dd46582c | 119 | docs/CODING_STYLE \ |
1337eee2 | 120 | docs/COPYING |
5ca9dc30 MT |
121 | |
122 | dist_sbin_SCRIPTS = \ | |
123 | src/dhclient-script \ | |
0c5d22de | 124 | src/firewall \ |
5ca9dc30 MT |
125 | src/network |
126 | ||
a62e991a | 127 | network_DATA = \ |
5ca9dc30 MT |
128 | src/functions/functions |
129 | ||
130 | CLEANFILES += \ | |
131 | src/functions/functions | |
132 | ||
133 | EXTRA_DIST += \ | |
134 | src/functions/functions.in | |
135 | ||
a62e991a | 136 | dist_network_DATA = \ |
5ca9dc30 MT |
137 | src/functions/functions.at \ |
138 | src/functions/functions.auth \ | |
6a1b0fb1 | 139 | src/functions/functions.bird \ |
5ca9dc30 MT |
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 \ | |
5ccc7299 | 150 | src/functions/functions.description \ |
5ca9dc30 MT |
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 \ | |
e524986c | 157 | src/functions/functions.editor \ |
5ca9dc30 MT |
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 \ | |
b8026986 | 164 | src/functions/functions.hotplug \ |
5ca9dc30 | 165 | src/functions/functions.http \ |
de72bd91 | 166 | src/functions/functions.interrupts \ |
5ca9dc30 | 167 | src/functions/functions.ip \ |
be844b7b | 168 | src/functions/functions.ipsec \ |
4e78b7ad | 169 | src/functions/functions.ipsec-pool \ |
5ca9dc30 MT |
170 | src/functions/functions.iptables \ |
171 | src/functions/functions.ip-tunnel \ | |
172 | src/functions/functions.ipv4 \ | |
173 | src/functions/functions.ipv6 \ | |
208f7452 | 174 | src/functions/functions.leds \ |
5ca9dc30 MT |
175 | src/functions/functions.list \ |
176 | src/functions/functions.lock \ | |
177 | src/functions/functions.logging \ | |
178 | src/functions/functions.macros \ | |
5ca9dc30 | 179 | src/functions/functions.modem \ |
3608f641 | 180 | src/functions/functions.offloading \ |
5ca9dc30 MT |
181 | src/functions/functions.phy \ |
182 | src/functions/functions.ports \ | |
183 | src/functions/functions.ppp \ | |
184 | src/functions/functions.pppoe-server \ | |
5ca9dc30 MT |
185 | src/functions/functions.route \ |
186 | src/functions/functions.routing \ | |
187 | src/functions/functions.serial \ | |
188 | src/functions/functions.service \ | |
e9df08ad | 189 | src/functions/functions.settings \ |
5ca9dc30 | 190 | src/functions/functions.stp \ |
5ca9dc30 | 191 | src/functions/functions.sysctl \ |
de72bd91 | 192 | src/functions/functions.system \ |
de3cecef | 193 | src/functions/functions.triggers \ |
5ca9dc30 MT |
194 | src/functions/functions.usb \ |
195 | src/functions/functions.util \ | |
196 | src/functions/functions.vlan \ | |
2da98f56 | 197 | src/functions/functions.vpn \ |
3eae7bed | 198 | src/functions/functions.vpn-security-policies \ |
5ca9dc30 | 199 | src/functions/functions.wireless \ |
81bf9898 | 200 | src/functions/functions.wireless-mesh \ |
49958b8c | 201 | src/functions/functions.wireless-networks \ |
5ca9dc30 MT |
202 | src/functions/functions.wpa_supplicant \ |
203 | src/functions/functions.zone \ | |
5ca9dc30 MT |
204 | src/header-config \ |
205 | src/header-port \ | |
f9217f83 | 206 | src/header-zone |
5ca9dc30 | 207 | |
b719b3f7 | 208 | dist_network_SCRIPTS = \ |
f9217f83 MT |
209 | src/dhclient-helper \ |
210 | src/ppp/dialer \ | |
211 | src/ppp/pppoe-server | |
b719b3f7 | 212 | |
5ca9dc30 | 213 | dist_helpers_SCRIPTS = \ |
5ca9dc30 | 214 | src/helpers/dhcpd-config-helper \ |
5ca9dc30 | 215 | src/helpers/hostapd-config-helper \ |
67baa452 | 216 | src/helpers/ipsec-updown \ |
5ca9dc30 | 217 | src/helpers/pppd-angel \ |
02807ad2 | 218 | src/helpers/wpa_supplicant |
5ca9dc30 | 219 | |
13a6e69f MT |
220 | bin_PROGRAMS = \ |
221 | src/inetcalc | |
222 | ||
223 | src_inetcalc_SOURCES = \ | |
224 | src/inetcalc.c | |
225 | ||
01f2b2e4 MT |
226 | src_inetcalc_LDADD = \ |
227 | src/libnetwork.la | |
228 | ||
7d2cb6d3 | 229 | dist_hooks_configs_SCRIPTS = \ |
9353a4e4 | 230 | src/hooks/configs/dhcp \ |
b73e9d43 | 231 | src/hooks/configs/ipv6-auto \ |
46a28dcd MT |
232 | src/hooks/configs/pppoe-server \ |
233 | src/hooks/configs/static | |
7d2cb6d3 | 234 | |
5ca9dc30 | 235 | dist_hooks_ports_SCRIPTS = \ |
5ca9dc30 MT |
236 | src/hooks/ports/bonding \ |
237 | src/hooks/ports/dummy \ | |
238 | src/hooks/ports/ethernet \ | |
8032884d | 239 | src/hooks/ports/ip-tunnel \ |
5ca9dc30 | 240 | src/hooks/ports/vlan \ |
727248f0 MT |
241 | src/hooks/ports/wireless-ap \ |
242 | src/hooks/ports/wireless-mesh | |
5ca9dc30 MT |
243 | |
244 | dist_hooks_zones_SCRIPTS = \ | |
5ca9dc30 | 245 | src/hooks/zones/bridge \ |
85de251d | 246 | src/hooks/zones/ip-tunnel \ |
5ca9dc30 MT |
247 | src/hooks/zones/modem \ |
248 | src/hooks/zones/pppoe \ | |
5ca9dc30 MT |
249 | src/hooks/zones/wireless |
250 | ||
f166708b MT |
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 | ||
5ca9dc30 MT |
261 | # ------------------------------------------------------------------------------ |
262 | ||
01f2b2e4 MT |
263 | LIBNETWORK_CURRENT=0 |
264 | LIBNETWORK_REVISION=0 | |
265 | LIBNETWORK_AGE=0 | |
266 | ||
267 | pkginclude_HEADERS = \ | |
248629ae | 268 | src/libnetwork/network/interface.h \ |
6f4814db | 269 | src/libnetwork/network/libnetwork.h \ |
9cb2f0c0 MT |
270 | src/libnetwork/network/logging.h \ |
271 | src/libnetwork/network/phy.h | |
01f2b2e4 MT |
272 | |
273 | lib_LTLIBRARIES = \ | |
274 | src/libnetwork.la | |
275 | ||
276 | src_libnetwork_la_SOURCES = \ | |
248629ae | 277 | src/libnetwork/interface.c \ |
01f2b2e4 | 278 | src/libnetwork/libnetwork-private.h \ |
9cb2f0c0 MT |
279 | src/libnetwork/libnetwork.c \ |
280 | src/libnetwork/phy.c | |
01f2b2e4 | 281 | |
db0a2d76 MT |
282 | src_libnetwork_la_LIBADD = \ |
283 | $(LIBNL_LIBS) | |
284 | ||
6f4814db MT |
285 | src_libnetwork_la_CPPFLAGS = \ |
286 | $(AM_CPPFLAGS) \ | |
db0a2d76 | 287 | $(LIBNL_CPPFLAGS) \ |
6f4814db MT |
288 | -D_GNU_SOURCE \ |
289 | -DNETWORK_PRIVATE | |
290 | ||
db0a2d76 MT |
291 | src_libnetwork_la_CFLAGS = \ |
292 | $(AM_CFLAGS) \ | |
293 | $(LIBNL_CFLAGS) | |
294 | ||
01f2b2e4 MT |
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 | # ------------------------------------------------------------------------------ | |
050f4ece | 307 | |
ac0188ee | 308 | network_PROGRAMS += \ |
050f4ece MT |
309 | networkd |
310 | ||
311 | dist_networkd_SOURCES = \ | |
2e7f4705 | 312 | src/networkd/address.h \ |
09a6af17 MT |
313 | src/networkd/bus.c \ |
314 | src/networkd/bus.h \ | |
6b666d62 MT |
315 | src/networkd/config.c \ |
316 | src/networkd/config.h \ | |
112358f3 MT |
317 | src/networkd/daemon.c \ |
318 | src/networkd/daemon.h \ | |
d6edaf63 MT |
319 | src/networkd/daemon-bus.c \ |
320 | src/networkd/daemon-bus.h \ | |
b286cd83 MT |
321 | src/networkd/devmon.c \ |
322 | src/networkd/devmon.h \ | |
e9b0614e | 323 | src/networkd/json.h \ |
87a1e1e0 MT |
324 | src/networkd/link.c \ |
325 | src/networkd/link.h \ | |
18b8c841 MT |
326 | src/networkd/links.c \ |
327 | src/networkd/links.h \ | |
1a70a686 | 328 | src/networkd/logging.c \ |
c251a9dd | 329 | src/networkd/logging.h \ |
4237caa2 | 330 | src/networkd/main.c \ |
b8db2713 MT |
331 | src/networkd/ports.c \ |
332 | src/networkd/ports.h \ | |
7297ba7f MT |
333 | src/networkd/port.c \ |
334 | src/networkd/port.h \ | |
95c5dca2 MT |
335 | src/networkd/port-bonding.c \ |
336 | src/networkd/port-bonding.h \ | |
7297ba7f MT |
337 | src/networkd/port-bus.c \ |
338 | src/networkd/port-bus.h \ | |
9e8af30e MT |
339 | src/networkd/port-dummy.c \ |
340 | src/networkd/port-dummy.h \ | |
ff886975 MT |
341 | src/networkd/port-vlan.c \ |
342 | src/networkd/port-vlan.h \ | |
15240e08 MT |
343 | src/networkd/stats-collector.c \ |
344 | src/networkd/stats-collector.h \ | |
e4eebc6e | 345 | src/networkd/string.h \ |
c791afc8 MT |
346 | src/networkd/util.c \ |
347 | src/networkd/util.h \ | |
0c8e7342 MT |
348 | src/networkd/zones.c \ |
349 | src/networkd/zones.h \ | |
e4eebc6e | 350 | src/networkd/zone.c \ |
ed00ef20 MT |
351 | src/networkd/zone.h \ |
352 | src/networkd/zone-bus.c \ | |
353 | src/networkd/zone-bus.h | |
050f4ece MT |
354 | |
355 | networkd_CPPFLAGS = \ | |
5c1452a4 MT |
356 | $(AM_CPPFLAGS) \ |
357 | -DCONFIG_DIR="\"$(configdir)\"" | |
050f4ece MT |
358 | |
359 | networkd_CFLAGS = \ | |
5d326bbb | 360 | $(AM_CFLAGS) \ |
dabf344d | 361 | $(CAP_CFLAGS) \ |
6384cfdf | 362 | $(JSON_C_CFLAGS) \ |
5d326bbb | 363 | $(SYSTEMD_CFLAGS) |
050f4ece MT |
364 | |
365 | networkd_LDFLAGS = \ | |
366 | $(AM_LDFLAGS) | |
367 | ||
5d326bbb | 368 | networkd_LDADD = \ |
b53b186e | 369 | src/libnetwork.la \ |
dabf344d | 370 | $(CAP_LIBS) \ |
6384cfdf | 371 | $(JSON_C_LIBS) \ |
5d326bbb MT |
372 | $(SYSTEMD_LIBS) |
373 | ||
d5fab986 MT |
374 | dist_dbuspolicy_DATA += \ |
375 | src/networkd/org.ipfire.network1.conf | |
376 | ||
377 | dist_dbussystembus_DATA += \ | |
063eb4d8 MT |
378 | src/networkd/org.ipfire.network1.service |
379 | ||
bf98bd65 MT |
380 | dist_polkitpolicy_DATA += \ |
381 | src/networkd/org.ipfire.network1.policy | |
382 | ||
5d968c01 MT |
383 | systemdsystemunit_DATA += \ |
384 | src/networkd/networkd.service | |
385 | ||
386 | EXTRA_DIST += \ | |
387 | src/networkd/networkd.service.in | |
388 | ||
389 | CLEANFILES += \ | |
390 | src/networkd/networkd.service | |
391 | ||
050f4ece | 392 | # ------------------------------------------------------------------------------ |
e145b2f3 | 393 | |
840738f6 MT |
394 | bin_PROGRAMS += \ |
395 | networkctl | |
396 | ||
397 | dist_networkctl_SOURCES = \ | |
f3bb976c MT |
398 | src/networkctl/command.c \ |
399 | src/networkctl/command.h \ | |
537fae0b | 400 | src/networkctl/main.c \ |
4c99b8ed MT |
401 | src/networkctl/port.c \ |
402 | src/networkctl/port.h \ | |
537fae0b MT |
403 | src/networkctl/zone.c \ |
404 | src/networkctl/zone.h | |
840738f6 MT |
405 | |
406 | networkctl_CFLAGS = \ | |
407 | $(AM_CFLAGS) \ | |
408 | $(SYSTEMD_CFLAGS) | |
409 | ||
410 | networkctl_LDFLAGS = \ | |
411 | $(AM_LDFLAGS) | |
412 | ||
413 | networkctl_LDADD = \ | |
414 | $(SYSTEMD_LIBS) | |
415 | ||
416 | # ------------------------------------------------------------------------------ | |
417 | ||
e145b2f3 | 418 | util_PROGRAMS = \ |
394cff53 | 419 | src/utils/network-phy-list-channels \ |
2e4e3c88 | 420 | src/utils/network-phy-list-ciphers \ |
b2323e58 MT |
421 | src/utils/network-phy-list-ht-caps \ |
422 | src/utils/network-phy-list-vht-caps | |
e145b2f3 | 423 | |
394cff53 MT |
424 | src_utils_network_phy_list_channels_SOURCES = \ |
425 | src/utils/network-phy-list-channels.c | |
426 | ||
427 | src_utils_network_phy_list_channels_LDADD = \ | |
428 | src/libnetwork.la | |
429 | ||
2e4e3c88 MT |
430 | src_utils_network_phy_list_ciphers_SOURCES = \ |
431 | src/utils/network-phy-list-ciphers.c | |
432 | ||
433 | src_utils_network_phy_list_ciphers_LDADD = \ | |
434 | src/libnetwork.la | |
435 | ||
e145b2f3 MT |
436 | src_utils_network_phy_list_ht_caps_SOURCES = \ |
437 | src/utils/network-phy-list-ht-caps.c | |
438 | ||
439 | src_utils_network_phy_list_ht_caps_LDADD = \ | |
440 | src/libnetwork.la | |
441 | ||
b2323e58 MT |
442 | src_utils_network_phy_list_vht_caps_SOURCES = \ |
443 | src/utils/network-phy-list-vht-caps.c | |
444 | ||
445 | src_utils_network_phy_list_vht_caps_LDADD = \ | |
446 | src/libnetwork.la | |
447 | ||
e145b2f3 | 448 | # ------------------------------------------------------------------------------ |
01f2b2e4 | 449 | |
5ca9dc30 MT |
450 | ppp_SCRIPTS = \ |
451 | src/ppp/ip-updown | |
452 | ||
453 | CLEANFILES += \ | |
454 | src/ppp/ip-updown | |
455 | ||
456 | EXTRA_DIST += \ | |
457 | src/ppp/ip-updown.in | |
458 | ||
459 | INSTALL_DIRS += \ | |
9c9d0585 SS |
460 | $(pppdir) \ |
461 | $(logdir) | |
5ca9dc30 MT |
462 | |
463 | ppp-install-hook: | |
464 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up | |
465 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up | |
466 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down | |
467 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up | |
468 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down | |
469 | ||
470 | ppp-uninstall-hook: | |
471 | rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up} | |
472 | rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up} | |
473 | ||
474 | INSTALL_EXEC_HOOKS += ppp-install-hook | |
475 | UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook | |
476 | ||
477 | # ------------------------------------------------------------------------------ | |
478 | ||
479 | if HAVE_SYSTEMD | |
5d968c01 | 480 | systemdsystemunit_DATA += \ |
67131768 | 481 | src/systemd/firewall.service \ |
5ca9dc30 MT |
482 | src/systemd/firewall-init.service \ |
483 | src/systemd/network-init.service \ | |
484 | src/systemd/network@.service | |
485 | ||
486 | CLEANFILES += \ | |
487 | $(systemdsystemunit_DATA) | |
488 | ||
489 | INSTALL_DIRS += \ | |
490 | $(systemdsystemunitdir) | |
491 | endif | |
492 | ||
493 | EXTRA_DIST += \ | |
b41f1f86 | 494 | src/systemd/firewall.service.in \ |
5ca9dc30 MT |
495 | src/systemd/firewall-init.service.in \ |
496 | src/systemd/network-init.service.in \ | |
497 | src/systemd/network@.service.in | |
498 | ||
499 | # ------------------------------------------------------------------------------ | |
500 | ||
5e84cd41 MT |
501 | systemconfig_vpndir = $(systemconfigdir)/vpn |
502 | ||
503 | dist_systemconfig_vpn_security_policies_DATA = \ | |
56d5efa7 | 504 | config/vpn/security-policies/performance \ |
5e84cd41 MT |
505 | config/vpn/security-policies/system |
506 | ||
507 | systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies | |
508 | ||
509 | # ------------------------------------------------------------------------------ | |
510 | ||
5ca9dc30 MT |
511 | dist_sysctl_DATA = \ |
512 | src/sysctl/network.conf | |
513 | ||
514 | # ------------------------------------------------------------------------------ | |
515 | ||
ea4abb82 MT |
516 | dist_modprobe_DATA = \ |
517 | src/modprobe.d/no-copybreak.conf | |
518 | ||
519 | # ------------------------------------------------------------------------------ | |
520 | ||
bae37360 MT |
521 | dist_bashcompletion_SCRIPTS = \ |
522 | src/bash-completion/network | |
523 | ||
524 | # ------------------------------------------------------------------------------ | |
525 | ||
5ca9dc30 | 526 | dist_tmpfiles_DATA = \ |
f9dac5a0 | 527 | src/tmpfiles/network.conf |
5ca9dc30 MT |
528 | |
529 | # ------------------------------------------------------------------------------ | |
530 | ||
531 | if HAVE_UDEV | |
532 | dist_udev_SCRIPTS = \ | |
533 | src/udev/network-hotplug \ | |
534 | src/udev/network-hotplug-rename \ | |
535 | src/udev/network-hotplug-serial | |
536 | ||
537 | dist_udevrules_DATA = \ | |
538 | src/udev/rules.d/50-serial-whitelist.rules \ | |
539 | src/udev/rules.d/60-net.rules | |
540 | ||
541 | INSTALL_DIRS += \ | |
542 | $(udevdir) \ | |
543 | $(udevrulesdir) | |
544 | endif | |
545 | ||
546 | # ------------------------------------------------------------------------------ | |
547 | ||
01f2b2e4 | 548 | pkgconfig_DATA = \ |
5ca9dc30 MT |
549 | src/network.pc |
550 | ||
551 | CLEANFILES += \ | |
01f2b2e4 | 552 | $(pkgconfig_DATA) |
5ca9dc30 MT |
553 | |
554 | EXTRA_DIST += \ | |
555 | src/network.pc.in | |
556 | ||
557 | # ------------------------------------------------------------------------------ | |
558 | ||
559 | dist_macros_DATA = \ | |
560 | src/macros/DHCP \ | |
561 | src/macros/HTTP \ | |
562 | src/macros/HTTPS \ | |
563 | src/macros/WWW | |
564 | ||
565 | # ------------------------------------------------------------------------------ | |
566 | ||
ec3fe5b7 | 567 | INSTALL_DIRS += \ |
de3cecef MT |
568 | $(triggersdir) |
569 | ||
570 | # ------------------------------------------------------------------------------ | |
571 | ||
5ca9dc30 | 572 | MANPAGES = \ |
2b0ff832 | 573 | man/firewall-settings.8 \ |
5ca9dc30 | 574 | man/network.8 \ |
5ca9dc30 | 575 | man/network-device.8 \ |
427f5ae2 | 576 | man/network-dhcp.8 \ |
5ca9dc30 | 577 | man/network-dns-server.8 \ |
de72bd91 | 578 | man/network-performance-tuning.8 \ |
7a302fa7 | 579 | man/network-port.8 \ |
94eab754 | 580 | man/network-quick-start.8 \ |
5ca9dc30 | 581 | man/network-route.8 \ |
e023191b | 582 | man/network-route-static.8 \ |
2b0ff832 | 583 | man/network-settings.8 \ |
bec94f95 | 584 | man/network-vpn.8 \ |
2612a6f4 | 585 | man/network-vpn-ipsec.8 \ |
bec94f95 | 586 | man/network-vpn-security-policies.8 \ |
5ca9dc30 | 587 | man/network-zone.8 \ |
5ca9dc30 MT |
588 | man/network-zone-bridge.8 \ |
589 | man/network-zone-config-pppoe-server.8 \ | |
bd767a3e | 590 | man/network-zone-ip-tunnel.8 \ |
7a302fa7 | 591 | man/network-zone-modem.8 \ |
2fb7ae4d MT |
592 | man/network-zone-pppoe.8 \ |
593 | man/network-zone-wireless.8 | |
5ca9dc30 | 594 | |
ff435238 MT |
595 | EXTRA_DIST += \ |
596 | man/include-color.txt \ | |
597 | man/include-description.txt | |
598 | ||
8f591cfc | 599 | MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES)) |
d746901b MT |
600 | MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT)) |
601 | MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT)) | |
5ca9dc30 MT |
602 | |
603 | .PHONY: man | |
604 | man: $(MANPAGES) $(MANPAGES_HTML) | |
605 | ||
dbe28a05 | 606 | if ENABLE_MANPAGES |
5ca9dc30 MT |
607 | man_MANS = \ |
608 | $(MANPAGES) | |
dbe28a05 | 609 | endif |
5ca9dc30 | 610 | |
5ca9dc30 | 611 | CLEANFILES += \ |
dbe28a05 | 612 | $(MANPAGES) \ |
d746901b MT |
613 | $(MANPAGES_HTML) \ |
614 | $(MANPAGES_XML) | |
5ca9dc30 MT |
615 | |
616 | EXTRA_DIST += \ | |
5d881996 | 617 | man/asciidoc.conf \ |
a7d2fef7 | 618 | $(MANPAGES_TXT) |
5ca9dc30 MT |
619 | |
620 | XSLTPROC_FLAGS = \ | |
621 | --nonet \ | |
622 | --stringparam man.output.quietly 1 \ | |
623 | --stringparam funcsynopsis.style ansi \ | |
624 | --stringparam man.th.extra1.suppress 1 \ | |
625 | --stringparam man.authors.section.enabled 1 \ | |
626 | --stringparam man.copyright.section.enabled 1 | |
627 | ||
628 | XSLTPROC_COMMAND_MAN = \ | |
5d881996 MT |
629 | $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \ |
630 | $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ | |
5ca9dc30 MT |
631 | http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< |
632 | ||
baf429f1 | 633 | man/%.xml: man/%.txt man/asciidoc.conf |
5d881996 MT |
634 | $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \ |
635 | $(ASCIIDOC) \ | |
636 | -f $(abs_srcdir)/man/asciidoc.conf \ | |
baf429f1 | 637 | -d manpage -b docbook -o $@ $< |
8f591cfc | 638 | |
5ca9dc30 MT |
639 | man/%.8: man/%.xml |
640 | $(XSLTPROC_COMMAND_MAN) | |
641 | ||
baf429f1 | 642 | man/%.html: man/%.txt man/asciidoc.conf |
5d881996 MT |
643 | $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \ |
644 | $(ASCIIDOC) \ | |
645 | -f $(abs_srcdir)/man/asciidoc.conf \ | |
baf429f1 | 646 | -b html5 -a icons -a theme=flask -o $@ $< |
5ca9dc30 | 647 | |
2d2e9626 MT |
648 | .PHONY: upload-man |
649 | upload-man: $(MANPAGES_HTML) | |
650 | rsync -avHz --delete --progress $(MANPAGES_HTML) ms@people.ipfire.org:/pub/man-pages/$(PACKAGE_NAME)/ | |
651 | ||
5ca9dc30 MT |
652 | # ------------------------------------------------------------------------------ |
653 | ||
654 | substitutions = \ | |
655 | '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ | |
656 | '|PACKAGE_URL=$(PACKAGE_URL)|' \ | |
657 | '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ | |
a35f416c | 658 | '|builddir=$(abs_builddir)|' \ |
5ca9dc30 MT |
659 | '|prefix=$(prefix)|' \ |
660 | '|exec_prefix=$(exec_prefix)|' \ | |
840738f6 | 661 | '|bindir=$(bindir)|' \ |
5ca9dc30 | 662 | '|sbindir=$(sbindir)|' \ |
c6525a63 | 663 | '|networkdir=$(networkdir)|' \ |
96275aa1 | 664 | '|helpersdir=$(helpersdir)|' \ |
c4966dd6 MT |
665 | '|utildir=$(utildir)|' \ |
666 | '|VIRTUAL_ENVIRONMENT_IMAGES_DIR=$(VIRTUAL_ENVIRONMENT_IMAGES_DIR)|' | |
5ca9dc30 MT |
667 | |
668 | SED_PROCESS = \ | |
669 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
670 | $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ | |
671 | < $< > $@ | |
672 | ||
3431f712 | 673 | %: %.in Makefile |
5ca9dc30 MT |
674 | $(SED_PROCESS) |
675 | ||
676 | INSTALL_DIRS += \ | |
677 | $(sbindir) | |
678 | ||
679 | install-exec-hook: $(INSTALL_EXEC_HOOKS) | |
680 | ||
681 | uninstall-hook: $(UNINSTALL_EXEC_HOOKS) | |
682 | ||
683 | # - testsuite ------------------------------------------------------------------ | |
684 | ||
685 | TESTS_ENVIRONMENT = \ | |
071d3416 | 686 | LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \ |
8744a476 MT |
687 | PATH=$(top_builddir)/src:$(PATH) \ |
688 | functions=$(abs_builddir)/src/functions/functions \ | |
689 | networkdir=$(abs_srcdir)/src/functions \ | |
690 | testdir=$(top_srcdir)/test | |
691 | ||
692 | dist_check_DATA = \ | |
ee86c73f | 693 | test/constants.sh \ |
c920185e MT |
694 | test/test-functions \ |
695 | test/networkd/test.sh | |
5ca9dc30 MT |
696 | |
697 | dist_check_SCRIPTS = \ | |
bb8304ec | 698 | test/load-library \ |
bb8304ec | 699 | test/functions/ip/ip_detect_protocol \ |
bb8304ec | 700 | test/functions/ip/ip_get_prefix \ |
8b0958b2 | 701 | test/functions/ip/ip_net_is_valid \ |
b7fd8067 | 702 | test/functions/ip/ip_is_valid \ |
b862734c | 703 | test/functions/ip/ip_network_is_subnet_of \ |
b7fd8067 MT |
704 | test/functions/ip/ip_prefix_is_valid \ |
705 | test/functions/ip/ip_protocol_is_supported \ | |
706 | test/functions/ip/ip_split_prefix | |
1908d2b3 | 707 | |
c920185e MT |
708 | TESTS += $(dist_check_SCRIPTS) |
709 | ||
710 | TEST_EXTENSIONS = .t | |
711 | ||
712 | NETWORKD_TESTS = \ | |
713 | test/networkd/00_launch.t | |
714 | ||
715 | TESTS += $(NETWORKD_TESTS) | |
716 | ||
717 | EXTRA_DIST += \ | |
718 | test/networkd/test.sh \ | |
719 | $(NETWORKD_TESTS) | |
720 | ||
721 | # Run all networkd tests in their own namespaces | |
722 | T_LOG_COMPILER = unshare --net --ipc --uts --user --cgroup --time --pid --fork \ | |
723 | $(SHELL) test/networkd/test.sh | |
724 | ||
1908d2b3 MT |
725 | # - NITSI tests ---------------------------------------------------------------- |
726 | ||
232d01c8 | 727 | # Files for the virtual environment |
c4966dd6 | 728 | VIRTUAL_ENVIRONMENT_FILES = \ |
232d01c8 MT |
729 | test/nitsi/virtual-environment/basic/machines/alice/machine.xml \ |
730 | test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \ | |
731 | test/nitsi/virtual-environment/basic/machines/bob/machine.xml \ | |
732 | test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \ | |
733 | test/nitsi/virtual-environment/basic/network/network1/network.xml \ | |
734 | test/nitsi/virtual-environment/basic/network/network2/network.xml \ | |
735 | test/nitsi/virtual-environment/basic/network/network3/network.xml \ | |
736 | test/nitsi/virtual-environment/basic/network/network4/network.xml \ | |
232d01c8 MT |
737 | test/nitsi/virtual-environment/basic/settings |
738 | ||
c4966dd6 MT |
739 | EXTRA_DIST += \ |
740 | test/nitsi/virtual-environment/basic/machines/alice/machine.xml.in \ | |
741 | test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml.in \ | |
742 | test/nitsi/virtual-environment/basic/machines/bob/machine.xml.in \ | |
43d82e80 JS |
743 | test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml.in \ |
744 | test/nitsi/virtual-environment/basic/settings.in | |
c4966dd6 MT |
745 | |
746 | CLEANFILES += \ | |
747 | test/nitsi/virtual-environment/basic/machines/alice/machine.xml \ | |
748 | test/nitsi/virtual-environment/basic/machines/alice/snapshot.xml \ | |
749 | test/nitsi/virtual-environment/basic/machines/bob/machine.xml \ | |
43d82e80 JS |
750 | test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \ |
751 | test/nitsi/virtual-environment/basic/settings | |
c4966dd6 MT |
752 | |
753 | # Virtual Machine Images | |
754 | VIRTUAL_ENVIRONMENT_IMAGES = \ | |
755 | $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-alice-2.qcow2 \ | |
756 | $(VIRTUAL_ENVIRONMENT_IMAGES_DIR)/ipfire-bob.qcow2 | |
757 | ||
758 | DISTCLEANFILES += \ | |
759 | $(VIRTUAL_ENVIRONMENT_IMAGES) | |
760 | ||
761 | VIRTUAL_ENVIRONMENT_IMAGES_DIR = $(abs_builddir)/test/nitsi/virtual-environment/.images | |
762 | VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL = \ | |
763 | https://people.ipfire.org/~jschlag/nitsi-ipfire/virtual-environment/basic/ | |
764 | ||
60dbefba | 765 | NITSI_INCLUDE_RECIPES = \ |
fb99a6c7 | 766 | test/nitsi/include/setup |
60dbefba JS |
767 | |
768 | EXTRA_DIST += \ | |
fb99a6c7 | 769 | test/nitsi/include/setup.in |
60dbefba JS |
770 | |
771 | CLEANFILES += \ | |
fb99a6c7 | 772 | test/nitsi/include/setup |
60dbefba | 773 | |
1908d2b3 | 774 | NITSI_TESTS = \ |
4c769bb2 | 775 | test/nitsi/test/make-check \ |
ae7a79da | 776 | test/nitsi/test/phase1 \ |
7808dbf2 | 777 | test/nitsi/test/pppoe \ |
07c82cd3 | 778 | test/nitsi/test/raw-device-get-by-mac \ |
9c8ff8de | 779 | test/nitsi/test/zone-new-bridge \ |
283ad5b0 | 780 | test/nitsi/test/zone-port-attach-bridge \ |
8c929286 MT |
781 | test/nitsi/test/zone/ip-tunnel/gre6 \ |
782 | test/nitsi/test/zone/ip-tunnel/gre4 \ | |
60b6dd44 JS |
783 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4 \ |
784 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6 \ | |
785 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4 \ | |
786 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6 \ | |
787 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4 \ | |
788 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6 \ | |
87ad62bc | 789 | test/nitsi/test/port-vlan |
1908d2b3 MT |
790 | |
791 | EXTRA_DIST += \ | |
91ee6559 | 792 | test/nitsi/test/settings.in \ |
a35f416c | 793 | test/nitsi/test/make-check/recipe.in \ |
07c82cd3 JS |
794 | test/nitsi/test/make-check/settings.in \ |
795 | test/nitsi/test/raw-device-get-by-mac/recipe \ | |
796 | test/nitsi/test/raw-device-get-by-mac/settings.in \ | |
797 | test/nitsi/test/zone-new-bridge/recipe \ | |
9c8ff8de JS |
798 | test/nitsi/test/zone-new-bridge/settings.in \ |
799 | test/nitsi/test/zone-port-attach-bridge/recipe \ | |
283ad5b0 | 800 | test/nitsi/test/zone-port-attach-bridge/settings.in \ |
8c929286 MT |
801 | test/nitsi/test/zone/ip-tunnel/gre6/recipe \ |
802 | test/nitsi/test/zone/ip-tunnel/gre6/settings \ | |
803 | test/nitsi/test/zone/ip-tunnel/gre4/recipe \ | |
804 | test/nitsi/test/zone/ip-tunnel/gre4/settings \ | |
60b6dd44 JS |
805 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/recipe \ |
806 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/settings \ | |
807 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/recipe \ | |
808 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/settings \ | |
809 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/recipe \ | |
810 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4/settings \ | |
811 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/recipe \ | |
812 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv6/settings \ | |
813 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/recipe \ | |
814 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv4/settings \ | |
815 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/recipe \ | |
816 | test/nitsi/test/vpn/ipsec/n2n/vti/ipv64-via-ipv6/settings \ | |
817 | test/nitsi/test/port-vlan/recipe \ | |
818 | test/nitsi/test/port-vlan/settings | |
a35f416c MT |
819 | |
820 | CLEANFILES += \ | |
91ee6559 | 821 | test/nitsi/test/settings \ |
a35f416c | 822 | test/nitsi/test/make-check/recipe \ |
4c769bb2 | 823 | test/nitsi/test/make-check/settings \ |
07c82cd3 | 824 | test/nitsi/test/raw-device-get-by-mac/settings \ |
9c8ff8de | 825 | test/nitsi/test/zone-new-bridge/settings \ |
9b01a925 | 826 | test/nitsi/test/zone-port-attach-bridge/settings |
1908d2b3 MT |
827 | |
828 | NITSI_ENVIRONMENT = | |
829 | ||
830 | .PHONY: $(NITSI_TESTS) | |
59281a53 | 831 | $(NITSI_TESTS): % : dist %/recipe %/settings test/nitsi/test/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES) $(NITSI_INCLUDE_RECIPES) |
91ee6559 | 832 | $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@ \ |
e3e44ab6 | 833 | --default-settings $(abs_builddir)/test/nitsi/test/settings --interactive-error-handling |
1908d2b3 MT |
834 | |
835 | .PHONY: nitsi | |
59281a53 | 836 | nitsi: $(NITSI_TESTS) |
c4966dd6 MT |
837 | |
838 | # Downloads a virtual image file and extracts it | |
839 | $(VIRTUAL_ENVIRONMENT_IMAGES): | |
840 | $(AM_V_DOWNLOAD)$(MKDIR_P) $(dir $@) && \ | |
841 | $(WGET) -qO - $(VIRTUAL_ENVIRONMENT_IMAGES_DOWNLOAD_URL)/$(notdir $@).xz | xz -qd > $@ |