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