]>
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 | ||
bae37360 | 31 | bashcompletiondir= $(datadir)/bash-completion/completions |
5ca9dc30 MT |
32 | libexecdir = $(prefix)/lib |
33 | pkgconfigdatadir = $(datadir)/pkgconfig | |
34 | pppdir = $(sysconfdir)/ppp | |
5e84cd41 | 35 | systemconfigdir = $(datadir)/network |
5ca9dc30 MT |
36 | sysctldir = $(prefix)/lib/sysctl.d |
37 | tmpfilesdir = $(prefix)/lib/tmpfiles.d | |
38 | udevrulesdir = $(udevdir)/rules.d | |
39 | ||
40 | networkdir = $(libexecdir)/network | |
41 | helpersdir = $(networkdir)/helpers | |
42 | ||
43 | macrosdir = $(libexecdir)/firewall/macros | |
44 | ||
45 | hooksdir = $(networkdir)/hooks | |
7d2cb6d3 | 46 | hooks_configsdir = $(hooksdir)/configs |
5ca9dc30 MT |
47 | hooks_portsdir = $(hooksdir)/ports |
48 | hooks_zonesdir = $(hooksdir)/zones | |
49 | ||
de3cecef MT |
50 | triggersdir = $(networkdir)/triggers |
51 | ||
9c9d0585 SS |
52 | logdir = $(localestatedir)/log/network |
53 | ||
5ca9dc30 MT |
54 | CLEANFILES = |
55 | DISTCLEANFILES = | |
56 | EXTRA_DIST = | |
57 | INSTALL_DIRS = | |
58 | INSTALL_EXEC_HOOKS = | |
59 | UNINSTALL_EXEC_HOOKS = | |
60 | noinst_DATA = | |
61 | ||
e708653f SS |
62 | AM_CFLAGS = $(OUR_CFLAGS) |
63 | AM_CPPFLAGS = $(OUR_CPPFLAGS) | |
64 | AM_LDFLAGS = $(OUR_LDFLAGS) | |
65 | ||
5ca9dc30 MT |
66 | DISTCHECK_CONFIGURE_FLAGS = \ |
67 | --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \ | |
68 | --with-udevdir=$$dc_install_base/$(udevdir) | |
69 | ||
70 | install-directories-hook: | |
71 | $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS)) | |
72 | ||
73 | INSTALL_EXEC_HOOKS += \ | |
74 | install-directories-hook | |
75 | ||
76 | # ------------------------------------------------------------------------------ | |
77 | ||
78 | AM_V_XSLT = $(AM_V_XSLT_$(V)) | |
79 | AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY)) | |
80 | AM_V_XSLT_0 = @echo " XSLT " $@; | |
81 | ||
82 | # ------------------------------------------------------------------------------ | |
83 | ||
84 | dist_doc_DATA = \ | |
1337eee2 | 85 | README \ |
dd46582c | 86 | docs/CODING_STYLE \ |
1337eee2 | 87 | docs/COPYING |
5ca9dc30 MT |
88 | |
89 | dist_sbin_SCRIPTS = \ | |
90 | src/dhclient-script \ | |
91 | src/firewall-config \ | |
92 | src/firewall4 \ | |
93 | src/firewall6 \ | |
94 | src/network | |
95 | ||
96 | network_SCRIPTS = \ | |
97 | src/functions/functions | |
98 | ||
99 | CLEANFILES += \ | |
100 | src/functions/functions | |
101 | ||
102 | EXTRA_DIST += \ | |
103 | src/functions/functions.in | |
104 | ||
105 | dist_network_SCRIPTS = \ | |
5ca9dc30 MT |
106 | src/functions/functions.at \ |
107 | src/functions/functions.auth \ | |
5ca9dc30 MT |
108 | src/functions/functions.bonding \ |
109 | src/functions/functions.bridge \ | |
110 | src/functions/functions.cli \ | |
111 | src/functions/functions.cli.firewall \ | |
112 | src/functions/functions.colors \ | |
113 | src/functions/functions.config \ | |
114 | src/functions/functions.conntrack \ | |
115 | src/functions/functions.constants \ | |
116 | src/functions/functions.constants-firewall \ | |
117 | src/functions/functions.db \ | |
5ccc7299 | 118 | src/functions/functions.description \ |
5ca9dc30 MT |
119 | src/functions/functions.device \ |
120 | src/functions/functions.dhclient \ | |
121 | src/functions/functions.dhcpd \ | |
122 | src/functions/functions.distro \ | |
123 | src/functions/functions.dns \ | |
124 | src/functions/functions.dummy \ | |
e524986c | 125 | src/functions/functions.editor \ |
5ca9dc30 MT |
126 | src/functions/functions.firewall \ |
127 | src/functions/functions.firewall-policy \ | |
128 | src/functions/functions.firewall-zones \ | |
129 | src/functions/functions.he \ | |
130 | src/functions/functions.hook \ | |
131 | src/functions/functions.hostapd \ | |
b8026986 | 132 | src/functions/functions.hotplug \ |
5ca9dc30 | 133 | src/functions/functions.http \ |
de72bd91 | 134 | src/functions/functions.interrupts \ |
5ca9dc30 | 135 | src/functions/functions.ip \ |
be844b7b | 136 | src/functions/functions.ipsec \ |
4e78b7ad | 137 | src/functions/functions.ipsec-pool \ |
5ca9dc30 MT |
138 | src/functions/functions.iptables \ |
139 | src/functions/functions.ip-tunnel \ | |
140 | src/functions/functions.ipv4 \ | |
141 | src/functions/functions.ipv6 \ | |
5ca9dc30 MT |
142 | src/functions/functions.list \ |
143 | src/functions/functions.lock \ | |
144 | src/functions/functions.logging \ | |
145 | src/functions/functions.macros \ | |
5ca9dc30 MT |
146 | src/functions/functions.modem \ |
147 | src/functions/functions.phy \ | |
148 | src/functions/functions.ports \ | |
149 | src/functions/functions.ppp \ | |
150 | src/functions/functions.pppoe-server \ | |
151 | src/functions/functions.radvd \ | |
5ca9dc30 MT |
152 | src/functions/functions.route \ |
153 | src/functions/functions.routing \ | |
154 | src/functions/functions.serial \ | |
155 | src/functions/functions.service \ | |
e9df08ad | 156 | src/functions/functions.settings \ |
5ca9dc30 | 157 | src/functions/functions.stp \ |
5ca9dc30 | 158 | src/functions/functions.sysctl \ |
de72bd91 | 159 | src/functions/functions.system \ |
de3cecef | 160 | src/functions/functions.triggers \ |
5ca9dc30 MT |
161 | src/functions/functions.usb \ |
162 | src/functions/functions.util \ | |
163 | src/functions/functions.vlan \ | |
2da98f56 | 164 | src/functions/functions.vpn \ |
3eae7bed | 165 | src/functions/functions.vpn-security-policies \ |
5ca9dc30 | 166 | src/functions/functions.wireless \ |
81bf9898 | 167 | src/functions/functions.wireless-mesh \ |
49958b8c | 168 | src/functions/functions.wireless-networks \ |
5ca9dc30 MT |
169 | src/functions/functions.wpa_supplicant \ |
170 | src/functions/functions.zone \ | |
171 | src/network-radvd-config \ | |
172 | src/dhclient-helper \ | |
173 | src/header-config \ | |
174 | src/header-port \ | |
175 | src/header-zone \ | |
176 | src/ppp/dialer \ | |
177 | src/ppp/pppoe-server | |
178 | ||
179 | dist_helpers_SCRIPTS = \ | |
5ca9dc30 MT |
180 | src/helpers/dhcpd-config-helper \ |
181 | src/helpers/firewall-kernel-init \ | |
182 | src/helpers/hostapd-config-helper \ | |
67baa452 | 183 | src/helpers/ipsec-updown \ |
5ca9dc30 | 184 | src/helpers/pppd-angel \ |
02807ad2 | 185 | src/helpers/wpa_supplicant |
5ca9dc30 | 186 | |
13a6e69f MT |
187 | bin_PROGRAMS = \ |
188 | src/inetcalc | |
189 | ||
190 | src_inetcalc_SOURCES = \ | |
191 | src/inetcalc.c | |
192 | ||
7d2cb6d3 | 193 | dist_hooks_configs_SCRIPTS = \ |
9353a4e4 | 194 | src/hooks/configs/dhcp \ |
7d2cb6d3 | 195 | src/hooks/configs/ipv4-static \ |
b73e9d43 MT |
196 | src/hooks/configs/ipv6-auto \ |
197 | src/hooks/configs/ipv6-static \ | |
7d2cb6d3 MT |
198 | src/hooks/configs/pppoe-server |
199 | ||
5ca9dc30 | 200 | dist_hooks_ports_SCRIPTS = \ |
5ca9dc30 MT |
201 | src/hooks/ports/bonding \ |
202 | src/hooks/ports/dummy \ | |
203 | src/hooks/ports/ethernet \ | |
5ca9dc30 | 204 | src/hooks/ports/vlan \ |
727248f0 MT |
205 | src/hooks/ports/wireless-ap \ |
206 | src/hooks/ports/wireless-mesh | |
5ca9dc30 MT |
207 | |
208 | dist_hooks_zones_SCRIPTS = \ | |
5ca9dc30 | 209 | src/hooks/zones/6to4-tunnel \ |
5ca9dc30 | 210 | src/hooks/zones/bridge \ |
5ca9dc30 MT |
211 | src/hooks/zones/modem \ |
212 | src/hooks/zones/pppoe \ | |
5ca9dc30 MT |
213 | src/hooks/zones/wireless |
214 | ||
215 | # ------------------------------------------------------------------------------ | |
216 | ||
217 | ppp_SCRIPTS = \ | |
218 | src/ppp/ip-updown | |
219 | ||
220 | CLEANFILES += \ | |
221 | src/ppp/ip-updown | |
222 | ||
223 | EXTRA_DIST += \ | |
224 | src/ppp/ip-updown.in | |
225 | ||
226 | INSTALL_DIRS += \ | |
9c9d0585 SS |
227 | $(pppdir) \ |
228 | $(logdir) | |
5ca9dc30 MT |
229 | |
230 | ppp-install-hook: | |
231 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up | |
232 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up | |
233 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down | |
234 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up | |
235 | ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down | |
236 | ||
237 | ppp-uninstall-hook: | |
238 | rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up} | |
239 | rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up} | |
240 | ||
241 | INSTALL_EXEC_HOOKS += ppp-install-hook | |
242 | UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook | |
243 | ||
244 | # ------------------------------------------------------------------------------ | |
245 | ||
246 | if HAVE_SYSTEMD | |
247 | systemdsystemunit_DATA = \ | |
248 | src/systemd/firewall4.service \ | |
249 | src/systemd/firewall6.service \ | |
250 | src/systemd/firewall-init.service \ | |
251 | src/systemd/network-init.service \ | |
252 | src/systemd/network@.service | |
253 | ||
254 | CLEANFILES += \ | |
255 | $(systemdsystemunit_DATA) | |
256 | ||
257 | INSTALL_DIRS += \ | |
258 | $(systemdsystemunitdir) | |
259 | endif | |
260 | ||
261 | EXTRA_DIST += \ | |
262 | src/systemd/firewall4.service.in \ | |
263 | src/systemd/firewall6.service.in \ | |
264 | src/systemd/firewall-init.service.in \ | |
265 | src/systemd/network-init.service.in \ | |
266 | src/systemd/network@.service.in | |
267 | ||
268 | # ------------------------------------------------------------------------------ | |
269 | ||
5e84cd41 MT |
270 | systemconfig_vpndir = $(systemconfigdir)/vpn |
271 | ||
272 | dist_systemconfig_vpn_security_policies_DATA = \ | |
56d5efa7 | 273 | config/vpn/security-policies/performance \ |
5e84cd41 MT |
274 | config/vpn/security-policies/system |
275 | ||
276 | systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies | |
277 | ||
278 | # ------------------------------------------------------------------------------ | |
279 | ||
5ca9dc30 MT |
280 | dist_sysctl_DATA = \ |
281 | src/sysctl/network.conf | |
282 | ||
283 | # ------------------------------------------------------------------------------ | |
284 | ||
bae37360 MT |
285 | dist_bashcompletion_SCRIPTS = \ |
286 | src/bash-completion/network | |
287 | ||
288 | # ------------------------------------------------------------------------------ | |
289 | ||
5ca9dc30 | 290 | dist_tmpfiles_DATA = \ |
f9dac5a0 | 291 | src/tmpfiles/network.conf |
5ca9dc30 MT |
292 | |
293 | # ------------------------------------------------------------------------------ | |
294 | ||
295 | if HAVE_UDEV | |
296 | dist_udev_SCRIPTS = \ | |
297 | src/udev/network-hotplug \ | |
298 | src/udev/network-hotplug-rename \ | |
299 | src/udev/network-hotplug-serial | |
300 | ||
301 | dist_udevrules_DATA = \ | |
302 | src/udev/rules.d/50-serial-whitelist.rules \ | |
303 | src/udev/rules.d/60-net.rules | |
304 | ||
305 | INSTALL_DIRS += \ | |
306 | $(udevdir) \ | |
307 | $(udevrulesdir) | |
308 | endif | |
309 | ||
310 | # ------------------------------------------------------------------------------ | |
311 | ||
312 | pkgconfigdata_DATA = \ | |
313 | src/network.pc | |
314 | ||
315 | CLEANFILES += \ | |
316 | $(pkgconfigdata_DATA) | |
317 | ||
318 | EXTRA_DIST += \ | |
319 | src/network.pc.in | |
320 | ||
321 | # ------------------------------------------------------------------------------ | |
322 | ||
323 | dist_macros_DATA = \ | |
324 | src/macros/DHCP \ | |
325 | src/macros/HTTP \ | |
326 | src/macros/HTTPS \ | |
327 | src/macros/WWW | |
328 | ||
329 | # ------------------------------------------------------------------------------ | |
330 | ||
ec3fe5b7 | 331 | INSTALL_DIRS += \ |
de3cecef MT |
332 | $(triggersdir) |
333 | ||
334 | # ------------------------------------------------------------------------------ | |
335 | ||
5ca9dc30 | 336 | MANPAGES = \ |
2b0ff832 | 337 | man/firewall-settings.8 \ |
5ca9dc30 | 338 | man/network.8 \ |
89c81bcf | 339 | man/network-color.8 \ |
6135a5b3 | 340 | man/network-description.8 \ |
5ca9dc30 | 341 | man/network-device.8 \ |
427f5ae2 | 342 | man/network-dhcp.8 \ |
5ca9dc30 | 343 | man/network-dns-server.8 \ |
de72bd91 | 344 | man/network-performance-tuning.8 \ |
7a302fa7 | 345 | man/network-port.8 \ |
94eab754 | 346 | man/network-quick-start.8 \ |
5ca9dc30 | 347 | man/network-route.8 \ |
e023191b | 348 | man/network-route-static.8 \ |
2b0ff832 | 349 | man/network-settings.8 \ |
5ca9dc30 | 350 | man/network-zone.8 \ |
5ca9dc30 | 351 | man/network-zone-6to4-tunnel.8 \ |
5ca9dc30 MT |
352 | man/network-zone-bridge.8 \ |
353 | man/network-zone-config-pppoe-server.8 \ | |
7a302fa7 | 354 | man/network-zone-modem.8 \ |
2fb7ae4d MT |
355 | man/network-zone-pppoe.8 \ |
356 | man/network-zone-wireless.8 | |
5ca9dc30 MT |
357 | |
358 | MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES)) | |
359 | MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML)) | |
360 | ||
361 | .PHONY: man | |
362 | man: $(MANPAGES) $(MANPAGES_HTML) | |
363 | ||
364 | man_MANS = \ | |
365 | $(MANPAGES) | |
366 | ||
367 | noinst_DATA += \ | |
368 | $(MANPAGES_HTML) | |
369 | ||
370 | CLEANFILES += \ | |
371 | $(man_MANS) \ | |
372 | $(MANPAGES_HTML) | |
373 | ||
374 | EXTRA_DIST += \ | |
375 | $(MANPAGES_XML) \ | |
376 | man/custom-html.xsl | |
377 | ||
378 | XSLTPROC_FLAGS = \ | |
379 | --nonet \ | |
380 | --stringparam man.output.quietly 1 \ | |
381 | --stringparam funcsynopsis.style ansi \ | |
382 | --stringparam man.th.extra1.suppress 1 \ | |
383 | --stringparam man.authors.section.enabled 1 \ | |
384 | --stringparam man.copyright.section.enabled 1 | |
385 | ||
386 | XSLTPROC_COMMAND_MAN = \ | |
387 | $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \ | |
388 | http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< | |
389 | ||
390 | XSLTPROC_COMMAND_HTML = \ | |
391 | $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $< | |
392 | ||
393 | man/%.8: man/%.xml | |
394 | $(XSLTPROC_COMMAND_MAN) | |
395 | ||
396 | man/%.html: man/%.xml man/custom-html.xsl | |
397 | $(XSLTPROC_COMMAND_HTML) | |
398 | ||
399 | # ------------------------------------------------------------------------------ | |
400 | ||
401 | substitutions = \ | |
402 | '|PACKAGE_NAME=$(PACKAGE_NAME)|' \ | |
403 | '|PACKAGE_URL=$(PACKAGE_URL)|' \ | |
404 | '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \ | |
405 | '|prefix=$(prefix)|' \ | |
406 | '|exec_prefix=$(exec_prefix)|' \ | |
407 | '|sbindir=$(sbindir)|' \ | |
c6525a63 MT |
408 | '|networkdir=$(networkdir)|' \ |
409 | '|helpersdir=$(helpersdir)|' | |
5ca9dc30 MT |
410 | |
411 | SED_PROCESS = \ | |
412 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | |
413 | $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \ | |
414 | < $< > $@ | |
415 | ||
416 | src/functions/functions: src/functions/functions.in Makefile | |
417 | $(SED_PROCESS) | |
418 | ||
419 | src/ppp/ip-updown: src/ppp/ip-updown.in Makefile | |
420 | $(SED_PROCESS) | |
421 | ||
422 | src/systemd/%: src/systemd/%.in Makefile | |
423 | $(SED_PROCESS) | |
424 | ||
425 | src/%.pc: src/%.pc.in Makefile | |
426 | $(SED_PROCESS) | |
427 | ||
428 | INSTALL_DIRS += \ | |
429 | $(sbindir) | |
430 | ||
431 | install-exec-hook: $(INSTALL_EXEC_HOOKS) | |
432 | ||
433 | uninstall-hook: $(UNINSTALL_EXEC_HOOKS) | |
434 | ||
435 | # - testsuite ------------------------------------------------------------------ | |
436 | ||
437 | TESTS_ENVIRONMENT = \ | |
8744a476 MT |
438 | PATH=$(top_builddir)/src:$(PATH) \ |
439 | functions=$(abs_builddir)/src/functions/functions \ | |
440 | networkdir=$(abs_srcdir)/src/functions \ | |
441 | testdir=$(top_srcdir)/test | |
442 | ||
443 | dist_check_DATA = \ | |
ee86c73f MT |
444 | test/constants.sh \ |
445 | test/test-functions | |
5ca9dc30 MT |
446 | |
447 | dist_check_SCRIPTS = \ | |
8744a476 | 448 | $(TESTS) |
5ca9dc30 MT |
449 | |
450 | TESTS = \ | |
bb8304ec | 451 | test/load-library \ |
bb8304ec | 452 | test/functions/ip/ip_detect_protocol \ |
bb8304ec | 453 | test/functions/ip/ip_get_prefix \ |
8b0958b2 | 454 | test/functions/ip/ip_net_is_valid \ |
b7fd8067 | 455 | test/functions/ip/ip_is_valid \ |
b862734c | 456 | test/functions/ip/ip_network_is_subnet_of \ |
b7fd8067 MT |
457 | test/functions/ip/ip_prefix_is_valid \ |
458 | test/functions/ip/ip_protocol_is_supported \ | |
459 | test/functions/ip/ip_split_prefix |