]> git.ipfire.org Git - people/stevee/network.git/blob - Makefile.am
Show help for zone creation
[people/stevee/network.git] / Makefile.am
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 bashcompletiondir= $(datadir)/bash-completion/completions
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
45 hooks_configsdir = $(hooksdir)/configs
46 hooks_portsdir = $(hooksdir)/ports
47 hooks_zonesdir = $(hooksdir)/zones
48
49 CLEANFILES =
50 DISTCLEANFILES =
51 EXTRA_DIST =
52 INSTALL_DIRS =
53 INSTALL_EXEC_HOOKS =
54 UNINSTALL_EXEC_HOOKS =
55 noinst_DATA =
56
57 DISTCHECK_CONFIGURE_FLAGS = \
58 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
59 --with-udevdir=$$dc_install_base/$(udevdir)
60
61 install-directories-hook:
62 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
63
64 INSTALL_EXEC_HOOKS += \
65 install-directories-hook
66
67 # ------------------------------------------------------------------------------
68
69 AM_V_XSLT = $(AM_V_XSLT_$(V))
70 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
71 AM_V_XSLT_0 = @echo " XSLT " $@;
72
73 # ------------------------------------------------------------------------------
74
75 dist_doc_DATA = \
76 COPYING \
77 README
78
79 dist_sbin_SCRIPTS = \
80 src/dhclient-script \
81 src/firewall-config \
82 src/firewall4 \
83 src/firewall6 \
84 src/network
85
86 network_SCRIPTS = \
87 src/functions/functions
88
89 CLEANFILES += \
90 src/functions/functions
91
92 EXTRA_DIST += \
93 src/functions/functions.in
94
95 dist_network_SCRIPTS = \
96 src/functions/functions.aiccu \
97 src/functions/functions.at \
98 src/functions/functions.auth \
99 src/functions/functions.batman-adv \
100 src/functions/functions.bonding \
101 src/functions/functions.bridge \
102 src/functions/functions.cli \
103 src/functions/functions.cli.firewall \
104 src/functions/functions.colors \
105 src/functions/functions.config \
106 src/functions/functions.conntrack \
107 src/functions/functions.constants \
108 src/functions/functions.constants-firewall \
109 src/functions/functions.db \
110 src/functions/functions.device \
111 src/functions/functions.dhclient \
112 src/functions/functions.dhcpd \
113 src/functions/functions.distro \
114 src/functions/functions.dns \
115 src/functions/functions.dummy \
116 src/functions/functions.ethernet \
117 src/functions/functions.firewall \
118 src/functions/functions.firewall-policy \
119 src/functions/functions.firewall-zones \
120 src/functions/functions.he \
121 src/functions/functions.hook \
122 src/functions/functions.hostapd \
123 src/functions/functions.hotplug \
124 src/functions/functions.http \
125 src/functions/functions.ip \
126 src/functions/functions.iptables \
127 src/functions/functions.ip-tunnel \
128 src/functions/functions.ipv4 \
129 src/functions/functions.ipv6 \
130 src/functions/functions.list \
131 src/functions/functions.lock \
132 src/functions/functions.logging \
133 src/functions/functions.macros \
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 \
145 src/functions/functions.settings \
146 src/functions/functions.stp \
147 src/functions/functions.sysctl \
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 \
168 src/helpers/pppd-angel \
169 src/helpers/wpa_supplicant \
170 src/helpers/wpa_supplicant-config-helper
171
172 bridge-stp-install-hook: bridge-stp-uninstall-hook
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
181 dist_hooks_configs_SCRIPTS = \
182 src/hooks/configs/ipv4-dhcp \
183 src/hooks/configs/ipv4-static \
184 src/hooks/configs/ipv6-auto \
185 src/hooks/configs/ipv6-dhcp \
186 src/hooks/configs/ipv6-static \
187 src/hooks/configs/pppoe-server
188
189 dist_hooks_ports_SCRIPTS = \
190 src/hooks/ports/batman-adv \
191 src/hooks/ports/bonding \
192 src/hooks/ports/dummy \
193 src/hooks/ports/ethernet \
194 src/hooks/ports/vlan \
195 src/hooks/ports/wireless-adhoc \
196 src/hooks/ports/wireless-ap
197
198 dist_hooks_zones_SCRIPTS = \
199 src/hooks/zones/6rd \
200 src/hooks/zones/6to4-tunnel \
201 src/hooks/zones/aiccu \
202 src/hooks/zones/bridge \
203 src/hooks/zones/modem \
204 src/hooks/zones/pppoe \
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_bashcompletion_SCRIPTS = \
267 src/bash-completion/network
268
269 # ------------------------------------------------------------------------------
270
271 dist_tmpfiles_DATA = \
272 src/tmpfiles/network
273
274 # ------------------------------------------------------------------------------
275
276 if HAVE_UDEV
277 dist_udev_SCRIPTS = \
278 src/udev/network-hotplug \
279 src/udev/network-hotplug-rename \
280 src/udev/network-hotplug-serial
281
282 dist_udevrules_DATA = \
283 src/udev/rules.d/50-serial-whitelist.rules \
284 src/udev/rules.d/60-net.rules
285
286 INSTALL_DIRS += \
287 $(udevdir) \
288 $(udevrulesdir)
289 endif
290
291 # ------------------------------------------------------------------------------
292
293 pkgconfigdata_DATA = \
294 src/network.pc
295
296 CLEANFILES += \
297 $(pkgconfigdata_DATA)
298
299 EXTRA_DIST += \
300 src/network.pc.in
301
302 # ------------------------------------------------------------------------------
303
304 dist_macros_DATA = \
305 src/macros/DHCP \
306 src/macros/HTTP \
307 src/macros/HTTPS \
308 src/macros/WWW
309
310 # ------------------------------------------------------------------------------
311
312 MANPAGES = \
313 man/firewall-settings.8 \
314 man/network.8 \
315 man/network-device.8 \
316 man/network-dns-server.8 \
317 man/network-port-batman-adv.8 \
318 man/network-port-batman-adv-port.8 \
319 man/network-route.8 \
320 man/network-settings.8 \
321 man/network-zone.8 \
322 man/network-zone-6rd.8 \
323 man/network-zone-6to4-tunnel.8 \
324 man/network-zone-aiccu.8 \
325 man/network-zone-bridge.8 \
326 man/network-zone-config-pppoe-server.8 \
327 man/network-zone-pppoe.8
328
329 MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
330 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
331
332 .PHONY: man
333 man: $(MANPAGES) $(MANPAGES_HTML)
334
335 man_MANS = \
336 $(MANPAGES)
337
338 noinst_DATA += \
339 $(MANPAGES_HTML)
340
341 CLEANFILES += \
342 $(man_MANS) \
343 $(MANPAGES_HTML)
344
345 EXTRA_DIST += \
346 $(MANPAGES_XML) \
347 man/custom-html.xsl
348
349 XSLTPROC_FLAGS = \
350 --nonet \
351 --stringparam man.output.quietly 1 \
352 --stringparam funcsynopsis.style ansi \
353 --stringparam man.th.extra1.suppress 1 \
354 --stringparam man.authors.section.enabled 1 \
355 --stringparam man.copyright.section.enabled 1
356
357 XSLTPROC_COMMAND_MAN = \
358 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
359 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
360
361 XSLTPROC_COMMAND_HTML = \
362 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
363
364 man/%.8: man/%.xml
365 $(XSLTPROC_COMMAND_MAN)
366
367 man/%.html: man/%.xml man/custom-html.xsl
368 $(XSLTPROC_COMMAND_HTML)
369
370 # ------------------------------------------------------------------------------
371
372 substitutions = \
373 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
374 '|PACKAGE_URL=$(PACKAGE_URL)|' \
375 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
376 '|prefix=$(prefix)|' \
377 '|exec_prefix=$(exec_prefix)|' \
378 '|sbindir=$(sbindir)|' \
379 '|networkdir=$(networkdir)|' \
380 '|helpersdir=$(helpersdir)|'
381
382 SED_PROCESS = \
383 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
384 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
385 < $< > $@
386
387 src/functions/functions: src/functions/functions.in Makefile
388 $(SED_PROCESS)
389
390 src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
391 $(SED_PROCESS)
392
393 src/systemd/%: src/systemd/%.in Makefile
394 $(SED_PROCESS)
395
396 src/%.pc: src/%.pc.in Makefile
397 $(SED_PROCESS)
398
399 INSTALL_DIRS += \
400 $(sbindir)
401
402 install-exec-hook: $(INSTALL_EXEC_HOOKS)
403
404 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
405
406 # - testsuite ------------------------------------------------------------------
407
408 TESTS_ENVIRONMENT = \
409 topdir="$(shell pwd)" \
410 networkdir="$(top_srcdir)/src/functions"
411
412 dist_check_SCRIPTS = \
413 test/load-library
414
415 TESTS = \
416 test/load-library