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