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