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