]> git.ipfire.org Git - people/stevee/network.git/blob - Makefile.am
Remove support for openvswitch (switch zone hook)
[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_portsdir = $(hooksdir)/ports
45 hooks_zonesdir = $(hooksdir)/zones
46
47 CLEANFILES =
48 DISTCLEANFILES =
49 EXTRA_DIST =
50 INSTALL_DIRS =
51 INSTALL_EXEC_HOOKS =
52 UNINSTALL_EXEC_HOOKS =
53 noinst_DATA =
54
55 DISTCHECK_CONFIGURE_FLAGS = \
56 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
57 --with-udevdir=$$dc_install_base/$(udevdir)
58
59 install-directories-hook:
60 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
61
62 INSTALL_EXEC_HOOKS += \
63 install-directories-hook
64
65 # ------------------------------------------------------------------------------
66
67 AM_V_XSLT = $(AM_V_XSLT_$(V))
68 AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
69 AM_V_XSLT_0 = @echo " XSLT " $@;
70
71 # ------------------------------------------------------------------------------
72
73 dist_doc_DATA = \
74 COPYING \
75 README
76
77 dist_sbin_SCRIPTS = \
78 src/dhclient-script \
79 src/firewall-config \
80 src/firewall4 \
81 src/firewall6 \
82 src/network
83
84 network_SCRIPTS = \
85 src/functions/functions
86
87 CLEANFILES += \
88 src/functions/functions
89
90 EXTRA_DIST += \
91 src/functions/functions.in
92
93 dist_network_SCRIPTS = \
94 src/functions/functions.aiccu \
95 src/functions/functions.at \
96 src/functions/functions.auth \
97 src/functions/functions.batman-adv \
98 src/functions/functions.bonding \
99 src/functions/functions.bridge \
100 src/functions/functions.cli \
101 src/functions/functions.cli.firewall \
102 src/functions/functions.colors \
103 src/functions/functions.config \
104 src/functions/functions.conntrack \
105 src/functions/functions.constants \
106 src/functions/functions.constants-firewall \
107 src/functions/functions.db \
108 src/functions/functions.device \
109 src/functions/functions.dhclient \
110 src/functions/functions.dhcpd \
111 src/functions/functions.distro \
112 src/functions/functions.dns \
113 src/functions/functions.dummy \
114 src/functions/functions.ethernet \
115 src/functions/functions.firewall \
116 src/functions/functions.firewall-policy \
117 src/functions/functions.firewall-zones \
118 src/functions/functions.he \
119 src/functions/functions.hook \
120 src/functions/functions.hostapd \
121 src/functions/functions.http \
122 src/functions/functions.ip \
123 src/functions/functions.iptables \
124 src/functions/functions.ip-tunnel \
125 src/functions/functions.ipv4 \
126 src/functions/functions.ipv6 \
127 src/functions/functions.isdn \
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.stp \
145 src/functions/functions.sysctl \
146 src/functions/functions.teredo \
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/miredo-config-helper \
168 src/helpers/miredo-helper \
169 src/helpers/pppd-angel \
170 src/helpers/wpa_supplicant \
171 src/helpers/wpa_supplicant-config-helper
172
173 bridge-stp-install-hook:
174 ln -svf --relative $(DESTDIR)$(helpersdir)/bridge-stp $(DESTDIR)$(sbindir)/
175
176 bridge-stp-uninstall-hook:
177 rm -f $(DESTDIR)$(sbindir)/bridge-stp
178
179 INSTALL_EXEC_HOOKS += bridge-stp-install-hook
180 UNINSTALL_EXEC_HOOKS += bridge-stp-uninstall-hook
181
182 dist_hooks_ports_SCRIPTS = \
183 src/hooks/ports/batman-adv \
184 src/hooks/ports/batman-adv-port \
185 src/hooks/ports/bonding \
186 src/hooks/ports/dummy \
187 src/hooks/ports/ethernet \
188 src/hooks/ports/macvlan \
189 src/hooks/ports/vlan \
190 src/hooks/ports/wireless-ap
191
192 dist_hooks_zones_SCRIPTS = \
193 src/hooks/zones/6rd \
194 src/hooks/zones/6to4-tunnel \
195 src/hooks/zones/aiccu \
196 src/hooks/zones/bridge \
197 src/hooks/zones/isdn \
198 src/hooks/zones/isdn-server \
199 src/hooks/zones/modem \
200 src/hooks/zones/pppoe \
201 src/hooks/zones/pptp \
202 src/hooks/zones/teredo \
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-config.8 \
307 man/network.8 \
308 man/network-config.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-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
375 SED_PROCESS = \
376 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
377 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
378 < $< > $@
379
380 src/functions/functions: src/functions/functions.in Makefile
381 $(SED_PROCESS)
382
383 src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
384 $(SED_PROCESS)
385
386 src/systemd/%: src/systemd/%.in Makefile
387 $(SED_PROCESS)
388
389 src/%.pc: src/%.pc.in Makefile
390 $(SED_PROCESS)
391
392 INSTALL_DIRS += \
393 $(sbindir)
394
395 install-exec-hook: $(INSTALL_EXEC_HOOKS)
396
397 uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
398
399 # - testsuite ------------------------------------------------------------------
400
401 TESTS_ENVIRONMENT = \
402 topdir="$(shell pwd)" \
403 networkdir="$(top_srcdir)/src/functions"
404
405 dist_check_SCRIPTS = \
406 test/load-library
407
408 TESTS = \
409 test/load-library