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