]> git.ipfire.org Git - people/ms/network.git/blame - Makefile.am
pppoe: Allow assigning ports to pppoe zones
[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 \
5ca9dc30
MT
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
161dist_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
d837cc79 173bridge-stp-install-hook: bridge-stp-uninstall-hook
5ca9dc30
MT
174 ln -svf --relative $(DESTDIR)$(helpersdir)/bridge-stp $(DESTDIR)$(sbindir)/
175
176bridge-stp-uninstall-hook:
177 rm -f $(DESTDIR)$(sbindir)/bridge-stp
178
179INSTALL_EXEC_HOOKS += bridge-stp-install-hook
180UNINSTALL_EXEC_HOOKS += bridge-stp-uninstall-hook
181
182dist_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
192dist_hooks_zones_SCRIPTS = \
193 src/hooks/zones/6rd \
194 src/hooks/zones/6to4-tunnel \
195 src/hooks/zones/aiccu \
5ca9dc30
MT
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 \
5ca9dc30
MT
202 src/hooks/zones/teredo \
203 src/hooks/zones/wireless
204
205# ------------------------------------------------------------------------------
206
207ppp_SCRIPTS = \
208 src/ppp/ip-updown
209
210CLEANFILES += \
211 src/ppp/ip-updown
212
213EXTRA_DIST += \
214 src/ppp/ip-updown.in
215
216INSTALL_DIRS += \
217 $(pppdir)
218
219ppp-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
226ppp-uninstall-hook:
227 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
228 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
229
230INSTALL_EXEC_HOOKS += ppp-install-hook
231UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
232
233# ------------------------------------------------------------------------------
234
235if HAVE_SYSTEMD
236systemdsystemunit_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
243CLEANFILES += \
244 $(systemdsystemunit_DATA)
245
246INSTALL_DIRS += \
247 $(systemdsystemunitdir)
248endif
249
250EXTRA_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
259dist_sysctl_DATA = \
260 src/sysctl/network.conf
261
262# ------------------------------------------------------------------------------
263
264dist_tmpfiles_DATA = \
265 src/tmpfiles/network
266
267# ------------------------------------------------------------------------------
268
269if HAVE_UDEV
270dist_udev_SCRIPTS = \
271 src/udev/network-hotplug \
272 src/udev/network-hotplug-rename \
273 src/udev/network-hotplug-serial
274
275dist_udevrules_DATA = \
276 src/udev/rules.d/50-serial-whitelist.rules \
277 src/udev/rules.d/60-net.rules
278
279INSTALL_DIRS += \
280 $(udevdir) \
281 $(udevrulesdir)
282endif
283
284# ------------------------------------------------------------------------------
285
286pkgconfigdata_DATA = \
287 src/network.pc
288
289CLEANFILES += \
290 $(pkgconfigdata_DATA)
291
292EXTRA_DIST += \
293 src/network.pc.in
294
295# ------------------------------------------------------------------------------
296
297dist_macros_DATA = \
298 src/macros/DHCP \
299 src/macros/HTTP \
300 src/macros/HTTPS \
301 src/macros/WWW
302
303# ------------------------------------------------------------------------------
304
305MANPAGES = \
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
323MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
324MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
325
326.PHONY: man
327man: $(MANPAGES) $(MANPAGES_HTML)
328
329man_MANS = \
330 $(MANPAGES)
331
332noinst_DATA += \
333 $(MANPAGES_HTML)
334
335CLEANFILES += \
336 $(man_MANS) \
337 $(MANPAGES_HTML)
338
339EXTRA_DIST += \
340 $(MANPAGES_XML) \
341 man/custom-html.xsl
342
343XSLTPROC_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
351XSLTPROC_COMMAND_MAN = \
352 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
353 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
354
355XSLTPROC_COMMAND_HTML = \
356 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
357
358man/%.8: man/%.xml
359 $(XSLTPROC_COMMAND_MAN)
360
361man/%.html: man/%.xml man/custom-html.xsl
362 $(XSLTPROC_COMMAND_HTML)
363
364# ------------------------------------------------------------------------------
365
366substitutions = \
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
375SED_PROCESS = \
376 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
377 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
378 < $< > $@
379
380src/functions/functions: src/functions/functions.in Makefile
381 $(SED_PROCESS)
382
383src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
384 $(SED_PROCESS)
385
386src/systemd/%: src/systemd/%.in Makefile
387 $(SED_PROCESS)
388
389src/%.pc: src/%.pc.in Makefile
390 $(SED_PROCESS)
391
392INSTALL_DIRS += \
393 $(sbindir)
394
395install-exec-hook: $(INSTALL_EXEC_HOOKS)
396
397uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
398
399# - testsuite ------------------------------------------------------------------
400
401TESTS_ENVIRONMENT = \
402 topdir="$(shell pwd)" \
403 networkdir="$(top_srcdir)/src/functions"
404
405dist_check_SCRIPTS = \
406 test/load-library
407
408TESTS = \
409 test/load-library