]>
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 | ||
b9ac9712 | 54 | logdir = $(localstatedir)/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 \ | |
f4f98a38 MT |
341 | src/networkd/port-ethernet.c \ |
342 | src/networkd/port-ethernet.h \ | |
67d3fef1 MT |
343 | src/networkd/port-veth.c \ |
344 | src/networkd/port-veth.h \ | |
ff886975 MT |
345 | src/networkd/port-vlan.c \ |
346 | src/networkd/port-vlan.h \ | |
15240e08 MT |
347 | src/networkd/stats-collector.c \ |
348 | src/networkd/stats-collector.h \ | |
e4eebc6e | 349 | src/networkd/string.h \ |
c791afc8 MT |
350 | src/networkd/util.c \ |
351 | src/networkd/util.h \ | |
0c8e7342 MT |
352 | src/networkd/zones.c \ |
353 | src/networkd/zones.h \ | |
e4eebc6e | 354 | src/networkd/zone.c \ |
ed00ef20 MT |
355 | src/networkd/zone.h \ |
356 | src/networkd/zone-bus.c \ | |
357 | src/networkd/zone-bus.h | |
050f4ece MT |
358 | |
359 | networkd_CPPFLAGS = \ | |
5c1452a4 MT |
360 | $(AM_CPPFLAGS) \ |
361 | -DCONFIG_DIR="\"$(configdir)\"" | |
050f4ece MT |
362 | |
363 | networkd_CFLAGS = \ | |
5d326bbb | 364 | $(AM_CFLAGS) \ |
dabf344d | 365 | $(CAP_CFLAGS) \ |
6384cfdf | 366 | $(JSON_C_CFLAGS) \ |
5d326bbb | 367 | $(SYSTEMD_CFLAGS) |
050f4ece MT |
368 | |
369 | networkd_LDFLAGS = \ | |
370 | $(AM_LDFLAGS) | |
371 | ||
5d326bbb | 372 | networkd_LDADD = \ |
b53b186e | 373 | src/libnetwork.la \ |
dabf344d | 374 | $(CAP_LIBS) \ |
6384cfdf | 375 | $(JSON_C_LIBS) \ |
5d326bbb MT |
376 | $(SYSTEMD_LIBS) |
377 | ||
d5fab986 MT |
378 | dist_dbuspolicy_DATA += \ |
379 | src/networkd/org.ipfire.network1.conf | |
380 | ||
381 | dist_dbussystembus_DATA += \ | |
063eb4d8 MT |
382 | src/networkd/org.ipfire.network1.service |
383 | ||
bf98bd65 MT |
384 | dist_polkitpolicy_DATA += \ |
385 | src/networkd/org.ipfire.network1.policy | |
386 | ||
5d968c01 MT |
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 | ||
050f4ece | 396 | # ------------------------------------------------------------------------------ |
e145b2f3 | 397 | |
840738f6 MT |
398 | bin_PROGRAMS += \ |
399 | networkctl | |
400 | ||
401 | dist_networkctl_SOURCES = \ | |
f3bb976c MT |
402 | src/networkctl/command.c \ |
403 | src/networkctl/command.h \ | |
537fae0b | 404 | src/networkctl/main.c \ |
4c99b8ed MT |
405 | src/networkctl/port.c \ |
406 | src/networkctl/port.h \ | |
aa7cc092 MT |
407 | src/networkctl/terminal.c \ |
408 | src/networkctl/terminal.h \ | |
537fae0b MT |
409 | src/networkctl/zone.c \ |
410 | src/networkctl/zone.h | |
840738f6 MT |
411 | |
412 | networkctl_CFLAGS = \ | |
413 | $(AM_CFLAGS) \ | |
3363ba36 | 414 | $(JSON_C_CFLAGS) \ |
840738f6 MT |
415 | $(SYSTEMD_CFLAGS) |
416 | ||
417 | networkctl_LDFLAGS = \ | |
418 | $(AM_LDFLAGS) | |
419 | ||
420 | networkctl_LDADD = \ | |
3363ba36 | 421 | $(JSON_C_LIBS) \ |
840738f6 MT |
422 | $(SYSTEMD_LIBS) |
423 | ||
424 | # ------------------------------------------------------------------------------ | |
425 | ||
e145b2f3 | 426 | util_PROGRAMS = \ |
394cff53 | 427 | src/utils/network-phy-list-channels \ |
2e4e3c88 | 428 | src/utils/network-phy-list-ciphers \ |
b2323e58 MT |
429 | src/utils/network-phy-list-ht-caps \ |
430 | src/utils/network-phy-list-vht-caps | |
e145b2f3 | 431 | |
394cff53 MT |
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 | ||
2e4e3c88 MT |
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 | ||
e145b2f3 MT |
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 | ||
b2323e58 MT |
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 | ||
e145b2f3 | 456 | # ------------------------------------------------------------------------------ |
01f2b2e4 | 457 | |
5ca9dc30 MT |
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 += \ | |
9c9d0585 SS |
468 | $(pppdir) \ |
469 | $(logdir) | |
5ca9dc30 MT |
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 | |
5d968c01 | 488 | systemdsystemunit_DATA += \ |
67131768 | 489 | src/systemd/firewall.service \ |
5ca9dc30 MT |
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 += \ | |
b41f1f86 | 502 | src/systemd/firewall.service.in \ |
5ca9dc30 MT |
503 | src/systemd/firewall-init.service.in \ |
504 | src/systemd/network-init.service.in \ | |
505 | src/systemd/network@.service.in | |
506 | ||
507 | # ------------------------------------------------------------------------------ | |
508 | ||
5e84cd41 MT |
509 | systemconfig_vpndir = $(systemconfigdir)/vpn |
510 | ||
511 | dist_systemconfig_vpn_security_policies_DATA = \ | |
56d5efa7 | 512 | config/vpn/security-policies/performance \ |
5e84cd41 MT |
513 | config/vpn/security-policies/system |
514 | ||
515 | systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies | |
516 | ||
517 | # ------------------------------------------------------------------------------ | |
518 | ||
5ca9dc30 MT |
519 | dist_sysctl_DATA = \ |
520 | src/sysctl/network.conf | |
521 | ||
522 | # ------------------------------------------------------------------------------ | |
523 | ||
ea4abb82 MT |
524 | dist_modprobe_DATA = \ |
525 | src/modprobe.d/no-copybreak.conf | |
526 | ||
527 | # ------------------------------------------------------------------------------ | |
528 | ||
bae37360 MT |
529 | dist_bashcompletion_SCRIPTS = \ |
530 | src/bash-completion/network | |
531 | ||
532 | # ------------------------------------------------------------------------------ | |
533 | ||
5ca9dc30 | 534 | dist_tmpfiles_DATA = \ |
f9dac5a0 | 535 | src/tmpfiles/network.conf |
5ca9dc30 MT |
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 | ||
01f2b2e4 | 556 | pkgconfig_DATA = \ |
5ca9dc30 MT |
557 | src/network.pc |
558 | ||
559 | CLEANFILES += \ | |
01f2b2e4 | 560 | $(pkgconfig_DATA) |
5ca9dc30 MT |
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 | ||
ec3fe5b7 | 575 | INSTALL_DIRS += \ |
de3cecef MT |
576 | $(triggersdir) |
577 | ||
578 | # ------------------------------------------------------------------------------ | |
579 | ||
5ca9dc30 | 580 | MANPAGES = \ |
2b0ff832 | 581 | man/firewall-settings.8 \ |
5ca9dc30 | 582 | man/network.8 \ |
5ca9dc30 | 583 | man/network-device.8 \ |
427f5ae2 | 584 | man/network-dhcp.8 \ |
5ca9dc30 | 585 | man/network-dns-server.8 \ |
de72bd91 | 586 | man/network-performance-tuning.8 \ |
7a302fa7 | 587 | man/network-port.8 \ |
94eab754 | 588 | man/network-quick-start.8 \ |
5ca9dc30 | 589 | man/network-route.8 \ |
e023191b | 590 | man/network-route-static.8 \ |
2b0ff832 | 591 | man/network-settings.8 \ |
bec94f95 | 592 | man/network-vpn.8 \ |
2612a6f4 | 593 | man/network-vpn-ipsec.8 \ |
bec94f95 | 594 | man/network-vpn-security-policies.8 \ |
5ca9dc30 | 595 | man/network-zone.8 \ |
5ca9dc30 MT |
596 | man/network-zone-bridge.8 \ |
597 | man/network-zone-config-pppoe-server.8 \ | |
bd767a3e | 598 | man/network-zone-ip-tunnel.8 \ |
7a302fa7 | 599 | man/network-zone-modem.8 \ |
2fb7ae4d MT |
600 | man/network-zone-pppoe.8 \ |
601 | man/network-zone-wireless.8 | |
5ca9dc30 | 602 | |
ff435238 MT |
603 | EXTRA_DIST += \ |
604 | man/include-color.txt \ | |
605 | man/include-description.txt | |
606 | ||
8f591cfc | 607 | MANPAGES_TXT = $(patsubst %.8,%.txt,$(MANPAGES)) |
d746901b MT |
608 | MANPAGES_HTML = $(patsubst %.txt,%.html,$(MANPAGES_TXT)) |
609 | MANPAGES_XML = $(patsubst %.txt,%.xml,$(MANPAGES_TXT)) | |
5ca9dc30 MT |
610 | |
611 | .PHONY: man | |
612 | man: $(MANPAGES) $(MANPAGES_HTML) | |
613 | ||
dbe28a05 | 614 | if ENABLE_MANPAGES |
5ca9dc30 MT |
615 | man_MANS = \ |
616 | $(MANPAGES) | |
dbe28a05 | 617 | endif |
5ca9dc30 | 618 | |
5ca9dc30 | 619 | CLEANFILES += \ |
dbe28a05 | 620 | $(MANPAGES) \ |
d746901b MT |
621 | $(MANPAGES_HTML) \ |
622 | $(MANPAGES_XML) | |
5ca9dc30 MT |
623 | |
624 | EXTRA_DIST += \ | |
5d881996 | 625 | man/asciidoc.conf \ |
a7d2fef7 | 626 | $(MANPAGES_TXT) |
5ca9dc30 MT |
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 = \ | |
5d881996 MT |
637 | $(AM_V_XSLT)$(MKDIR_P) $(dir $@) && \ |
638 | $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ | |
5ca9dc30 MT |
639 | http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< |
640 | ||
baf429f1 | 641 | man/%.xml: man/%.txt man/asciidoc.conf |
5d881996 MT |
642 | $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \ |
643 | $(ASCIIDOC) \ | |
644 | -f $(abs_srcdir)/man/asciidoc.conf \ | |
baf429f1 | 645 | -d manpage -b docbook -o $@ $< |
8f591cfc | 646 | |
5ca9dc30 MT |
647 | man/%.8: man/%.xml |
648 | $(XSLTPROC_COMMAND_MAN) | |
649 | ||
baf429f1 | 650 | man/%.html: man/%.txt man/asciidoc.conf |
5d881996 MT |
651 | $(AM_V_ASCIIDOC)$(MKDIR_P) $(dir $@) && \ |
652 | $(ASCIIDOC) \ | |
653 | -f $(abs_srcdir)/man/asciidoc.conf \ | |
baf429f1 | 654 | -b html5 -a icons -a theme=flask -o $@ $< |
5ca9dc30 | 655 | |
2d2e9626 MT |
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 | ||
5ca9dc30 MT |
660 | # ------------------------------------------------------------------------------ |
661 | ||
662 | substitutions = \ | |
663 | '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ | |
664 | '|PACKAGE_URL=$(PACKAGE_URL)|' \ | |
665 | '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ | |
a35f416c | 666 | '|builddir=$(abs_builddir)|' \ |
5ca9dc30 MT |
667 | '|prefix=$(prefix)|' \ |
668 | '|exec_prefix=$(exec_prefix)|' \ | |
840738f6 | 669 | '|bindir=$(bindir)|' \ |
5ca9dc30 | 670 | '|sbindir=$(sbindir)|' \ |
c6525a63 | 671 | '|networkdir=$(networkdir)|' \ |
96275aa1 | 672 | '|helpersdir=$(helpersdir)|' \ |
c4966dd6 MT |
673 | '|utildir=$(utildir)|' \ |
674 | '|VIRTUAL_ENVIRONMENT_IMAGES_DIR=$(VIRTUAL_ENVIRONMENT_IMAGES_DIR)|' | |
5ca9dc30 MT |
675 | |
676 | SED_PROCESS = \ | |
677 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
678 | $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ | |
679 | < $< > $@ | |
680 | ||
3431f712 | 681 | %: %.in Makefile |
5ca9dc30 MT |
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 = \ | |
071d3416 | 694 | LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(LD_LIBRARY_PATH) \ |
8744a476 MT |
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 = \ | |
ee86c73f | 701 | test/constants.sh \ |
c920185e MT |
702 | test/test-functions \ |
703 | test/networkd/test.sh | |
5ca9dc30 MT |
704 | |
705 | dist_check_SCRIPTS = \ | |
bb8304ec | 706 | test/load-library \ |
bb8304ec | 707 | test/functions/ip/ip_detect_protocol \ |
bb8304ec | 708 | test/functions/ip/ip_get_prefix \ |
8b0958b2 | 709 | test/functions/ip/ip_net_is_valid \ |
b7fd8067 | 710 | test/functions/ip/ip_is_valid \ |
b862734c | 711 | test/functions/ip/ip_network_is_subnet_of \ |
b7fd8067 MT |
712 | test/functions/ip/ip_prefix_is_valid \ |
713 | test/functions/ip/ip_protocol_is_supported \ | |
714 | test/functions/ip/ip_split_prefix | |
1908d2b3 | 715 | |
c920185e MT |
716 | TESTS += $(dist_check_SCRIPTS) |
717 | ||
718 | TEST_EXTENSIONS = .t | |
719 | ||
720 | NETWORKD_TESTS = \ | |
b2134e9e MT |
721 | test/networkd/00_launch.t \ |
722 | test/networkd/01_dummy.t | |
c920185e MT |
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 \ | |
119cc5be | 732 | --map-root-user --keep-caps $(SHELL) test/networkd/test.sh |
c920185e | 733 | |
1908d2b3 MT |
734 | # - NITSI tests ---------------------------------------------------------------- |
735 | ||
232d01c8 | 736 | # Files for the virtual environment |
c4966dd6 | 737 | VIRTUAL_ENVIRONMENT_FILES = \ |
232d01c8 MT |
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 \ | |
232d01c8 MT |
746 | test/nitsi/virtual-environment/basic/settings |
747 | ||
c4966dd6 MT |
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 \ | |
43d82e80 JS |
752 | test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml.in \ |
753 | test/nitsi/virtual-environment/basic/settings.in | |
c4966dd6 MT |
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 \ | |
43d82e80 JS |
759 | test/nitsi/virtual-environment/basic/machines/bob/snapshot.xml \ |
760 | test/nitsi/virtual-environment/basic/settings | |
c4966dd6 MT |
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 | ||
60dbefba | 774 | NITSI_INCLUDE_RECIPES = \ |
fb99a6c7 | 775 | test/nitsi/include/setup |
60dbefba JS |
776 | |
777 | EXTRA_DIST += \ | |
fb99a6c7 | 778 | test/nitsi/include/setup.in |
60dbefba JS |
779 | |
780 | CLEANFILES += \ | |
fb99a6c7 | 781 | test/nitsi/include/setup |
60dbefba | 782 | |
1908d2b3 | 783 | NITSI_TESTS = \ |
4c769bb2 | 784 | test/nitsi/test/make-check \ |
ae7a79da | 785 | test/nitsi/test/phase1 \ |
7808dbf2 | 786 | test/nitsi/test/pppoe \ |
07c82cd3 | 787 | test/nitsi/test/raw-device-get-by-mac \ |
9c8ff8de | 788 | test/nitsi/test/zone-new-bridge \ |
283ad5b0 | 789 | test/nitsi/test/zone-port-attach-bridge \ |
8c929286 MT |
790 | test/nitsi/test/zone/ip-tunnel/gre6 \ |
791 | test/nitsi/test/zone/ip-tunnel/gre4 \ | |
60b6dd44 JS |
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 \ | |
87ad62bc | 798 | test/nitsi/test/port-vlan |
1908d2b3 MT |
799 | |
800 | EXTRA_DIST += \ | |
91ee6559 | 801 | test/nitsi/test/settings.in \ |
a35f416c | 802 | test/nitsi/test/make-check/recipe.in \ |
07c82cd3 JS |
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 \ | |
9c8ff8de JS |
807 | test/nitsi/test/zone-new-bridge/settings.in \ |
808 | test/nitsi/test/zone-port-attach-bridge/recipe \ | |
283ad5b0 | 809 | test/nitsi/test/zone-port-attach-bridge/settings.in \ |
8c929286 MT |
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 \ | |
60b6dd44 JS |
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 | |
a35f416c MT |
828 | |
829 | CLEANFILES += \ | |
91ee6559 | 830 | test/nitsi/test/settings \ |
a35f416c | 831 | test/nitsi/test/make-check/recipe \ |
4c769bb2 | 832 | test/nitsi/test/make-check/settings \ |
07c82cd3 | 833 | test/nitsi/test/raw-device-get-by-mac/settings \ |
9c8ff8de | 834 | test/nitsi/test/zone-new-bridge/settings \ |
9b01a925 | 835 | test/nitsi/test/zone-port-attach-bridge/settings |
1908d2b3 MT |
836 | |
837 | NITSI_ENVIRONMENT = | |
838 | ||
839 | .PHONY: $(NITSI_TESTS) | |
59281a53 | 840 | $(NITSI_TESTS): % : dist %/recipe %/settings test/nitsi/test/settings $(VIRTUAL_ENVIRONMENT_FILES) $(VIRTUAL_ENVIRONMENT_IMAGES) $(NITSI_INCLUDE_RECIPES) |
91ee6559 | 841 | $(AM_V_NITSI) $(NITSI_ENVIRONMENT) $(NITSI) --log-level error run-test -d $@ \ |
e3e44ab6 | 842 | --default-settings $(abs_builddir)/test/nitsi/test/settings --interactive-error-handling |
1908d2b3 MT |
843 | |
844 | .PHONY: nitsi | |
59281a53 | 845 | nitsi: $(NITSI_TESTS) |
c4966dd6 MT |
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 > $@ |