]> git.ipfire.org Git - people/stevee/network.git/blob - Makefile.am
Remove support for ISDN
[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 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
44 hooks_configsdir = $(hooksdir)/configs
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 = \
75 COPYING \
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 \
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.list \
129 src/functions/functions.lock \
130 src/functions/functions.logging \
131 src/functions/functions.macros \
132 src/functions/functions.macvlan \
133 src/functions/functions.modem \
134 src/functions/functions.phy \
135 src/functions/functions.ports \
136 src/functions/functions.ppp \
137 src/functions/functions.pppoe-server \
138 src/functions/functions.radvd \
139 src/functions/functions.red \
140 src/functions/functions.route \
141 src/functions/functions.routing \
142 src/functions/functions.serial \
143 src/functions/functions.service \
144 src/functions/functions.settings \
145 src/functions/functions.stp \
146 src/functions/functions.sysctl \
147 src/functions/functions.usb \
148 src/functions/functions.util \
149 src/functions/functions.vlan \
150 src/functions/functions.wireless \
151 src/functions/functions.wpa_supplicant \
152 src/functions/functions.zone \
153 src/network-radvd-config \
154 src/dhclient-helper \
155 src/header-config \
156 src/header-port \
157 src/header-zone \
158 src/ppp/dialer \
159 src/ppp/pppoe-server
160
161 dist_helpers_SCRIPTS = \
162 src/helpers/aiccu-config-helper \
163 src/helpers/bridge-stp \
164 src/helpers/dhcpd-config-helper \
165 src/helpers/firewall-kernel-init \
166 src/helpers/hostapd-config-helper \
167 src/helpers/pppd-angel \
168 src/helpers/wpa_supplicant \
169 src/helpers/wpa_supplicant-config-helper
170
171 bridge-stp-install-hook: bridge-stp-uninstall-hook
172 ln -svf --relative $(DESTDIR)$(helpersdir)/bridge-stp $(DESTDIR)$(sbindir)/
173
174 bridge-stp-uninstall-hook:
175 rm -f $(DESTDIR)$(sbindir)/bridge-stp
176
177 INSTALL_EXEC_HOOKS += bridge-stp-install-hook
178 UNINSTALL_EXEC_HOOKS += bridge-stp-uninstall-hook
179
180 dist_hooks_configs_SCRIPTS = \
181 src/hooks/configs/ipv4-dhcp \
182 src/hooks/configs/ipv6-static \
183 src/hooks/configs/ipv4-static \
184 src/hooks/configs/pppoe-server
185
186 dist_hooks_ports_SCRIPTS = \
187 src/hooks/ports/batman-adv \
188 src/hooks/ports/batman-adv-port \
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 \
194 src/hooks/ports/wireless-ap
195
196 dist_hooks_zones_SCRIPTS = \
197 src/hooks/zones/6rd \
198 src/hooks/zones/6to4-tunnel \
199 src/hooks/zones/aiccu \
200 src/hooks/zones/bridge \
201 src/hooks/zones/modem \
202 src/hooks/zones/pppoe \
203 src/hooks/zones/pptp \
204 src/hooks/zones/wireless
205
206 # ------------------------------------------------------------------------------
207
208 ppp_SCRIPTS = \
209 src/ppp/ip-updown
210
211 CLEANFILES += \
212 src/ppp/ip-updown
213
214 EXTRA_DIST += \
215 src/ppp/ip-updown.in
216
217 INSTALL_DIRS += \
218 $(pppdir)
219
220 ppp-install-hook:
221 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
222 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
223 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
224 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
225 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
226
227 ppp-uninstall-hook:
228 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
229 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
230
231 INSTALL_EXEC_HOOKS += ppp-install-hook
232 UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
233
234 # ------------------------------------------------------------------------------
235
236 if HAVE_SYSTEMD
237 systemdsystemunit_DATA = \
238 src/systemd/firewall4.service \
239 src/systemd/firewall6.service \
240 src/systemd/firewall-init.service \
241 src/systemd/network-init.service \
242 src/systemd/network@.service
243
244 CLEANFILES += \
245 $(systemdsystemunit_DATA)
246
247 INSTALL_DIRS += \
248 $(systemdsystemunitdir)
249 endif
250
251 EXTRA_DIST += \
252 src/systemd/firewall4.service.in \
253 src/systemd/firewall6.service.in \
254 src/systemd/firewall-init.service.in \
255 src/systemd/network-init.service.in \
256 src/systemd/network@.service.in
257
258 # ------------------------------------------------------------------------------
259
260 dist_sysctl_DATA = \
261 src/sysctl/network.conf
262
263 # ------------------------------------------------------------------------------
264
265 dist_tmpfiles_DATA = \
266 src/tmpfiles/network
267
268 # ------------------------------------------------------------------------------
269
270 if HAVE_UDEV
271 dist_udev_SCRIPTS = \
272 src/udev/network-hotplug \
273 src/udev/network-hotplug-rename \
274 src/udev/network-hotplug-serial
275
276 dist_udevrules_DATA = \
277 src/udev/rules.d/50-serial-whitelist.rules \
278 src/udev/rules.d/60-net.rules
279
280 INSTALL_DIRS += \
281 $(udevdir) \
282 $(udevrulesdir)
283 endif
284
285 # ------------------------------------------------------------------------------
286
287 pkgconfigdata_DATA = \
288 src/network.pc
289
290 CLEANFILES += \
291 $(pkgconfigdata_DATA)
292
293 EXTRA_DIST += \
294 src/network.pc.in
295
296 # ------------------------------------------------------------------------------
297
298 dist_macros_DATA = \
299 src/macros/DHCP \
300 src/macros/HTTP \
301 src/macros/HTTPS \
302 src/macros/WWW
303
304 # ------------------------------------------------------------------------------
305
306 MANPAGES = \
307 man/firewall-settings.8 \
308 man/network.8 \
309 man/network-device.8 \
310 man/network-dns-server.8 \
311 man/network-port-batman-adv.8 \
312 man/network-port-batman-adv-port.8 \
313 man/network-route.8 \
314 man/network-settings.8 \
315 man/network-zone.8 \
316 man/network-zone-6rd.8 \
317 man/network-zone-6to4-tunnel.8 \
318 man/network-zone-aiccu.8 \
319 man/network-zone-bridge.8 \
320 man/network-zone-config-pppoe-server.8 \
321 man/network-zone-pppoe.8 \
322 man/network-zone-pptp.8
323
324 MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
325 MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
326
327 .PHONY: man
328 man: $(MANPAGES) $(MANPAGES_HTML)
329
330 man_MANS = \
331 $(MANPAGES)
332
333 noinst_DATA += \
334 $(MANPAGES_HTML)
335
336 CLEANFILES += \
337 $(man_MANS) \
338 $(MANPAGES_HTML)
339
340 EXTRA_DIST += \
341 $(MANPAGES_XML) \
342 man/custom-html.xsl
343
344 XSLTPROC_FLAGS = \
345 --nonet \
346 --stringparam man.output.quietly 1 \
347 --stringparam funcsynopsis.style ansi \
348 --stringparam man.th.extra1.suppress 1 \
349 --stringparam man.authors.section.enabled 1 \
350 --stringparam man.copyright.section.enabled 1
351
352 XSLTPROC_COMMAND_MAN = \
353 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
354 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
355
356 XSLTPROC_COMMAND_HTML = \
357 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
358
359 man/%.8: man/%.xml
360 $(XSLTPROC_COMMAND_MAN)
361
362 man/%.html: man/%.xml man/custom-html.xsl
363 $(XSLTPROC_COMMAND_HTML)
364
365 # ------------------------------------------------------------------------------
366
367 substitutions = \
368 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
369 '|PACKAGE_URL=$(PACKAGE_URL)|' \
370 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
371 '|prefix=$(prefix)|' \
372 '|exec_prefix=$(exec_prefix)|' \
373 '|sbindir=$(sbindir)|' \
374 '|networkdir=$(networkdir)|' \
375 '|helpersdir=$(helpersdir)|'
376
377 SED_PROCESS = \
378 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
379 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
380 < $< > $@
381
382 src/functions/functions: src/functions/functions.in Makefile
383 $(SED_PROCESS)
384
385 src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
386 $(SED_PROCESS)
387
388 src/systemd/%: src/systemd/%.in Makefile
389 $(SED_PROCESS)
390
391 src/%.pc: src/%.pc.in Makefile
392 $(SED_PROCESS)
393
394 INSTALL_DIRS += \
395 $(sbindir)
396
397 install-exec-hook: $(INSTALL_EXEC_HOOKS)
398
399 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
400
401 # - testsuite ------------------------------------------------------------------
402
403 TESTS_ENVIRONMENT = \
404 topdir="$(shell pwd)" \
405 networkdir="$(top_srcdir)/src/functions"
406
407 dist_check_SCRIPTS = \
408 test/load-library
409
410 TESTS = \
411 test/load-library