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