]> git.ipfire.org Git - people/stevee/network.git/blame_incremental - Makefile.am
wpa_supplicant: Doesn't like spaces here
[people/stevee/network.git] / Makefile.am
... / ...
CommitLineData
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
31bashcompletiondir= $(datadir)/bash-completion/completions
32libexecdir = $(prefix)/lib
33pkgconfigdatadir = $(datadir)/pkgconfig
34pppdir = $(sysconfdir)/ppp
35systemconfigdir = $(datadir)/network
36sysctldir = $(prefix)/lib/sysctl.d
37tmpfilesdir = $(prefix)/lib/tmpfiles.d
38udevrulesdir = $(udevdir)/rules.d
39
40networkdir = $(libexecdir)/network
41helpersdir = $(networkdir)/helpers
42
43macrosdir = $(libexecdir)/firewall/macros
44
45hooksdir = $(networkdir)/hooks
46hooks_configsdir = $(hooksdir)/configs
47hooks_portsdir = $(hooksdir)/ports
48hooks_zonesdir = $(hooksdir)/zones
49
50triggersdir = $(networkdir)/triggers
51
52logdir = $(localestatedir)/log/network
53
54CLEANFILES =
55DISTCLEANFILES =
56EXTRA_DIST =
57INSTALL_DIRS =
58INSTALL_EXEC_HOOKS =
59UNINSTALL_EXEC_HOOKS =
60noinst_DATA =
61
62AM_CFLAGS = $(OUR_CFLAGS)
63AM_CPPFLAGS = $(OUR_CPPFLAGS)
64AM_LDFLAGS = $(OUR_LDFLAGS)
65
66DISTCHECK_CONFIGURE_FLAGS = \
67 --with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
68 --with-udevdir=$$dc_install_base/$(udevdir)
69
70install-directories-hook:
71 $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
72
73INSTALL_EXEC_HOOKS += \
74 install-directories-hook
75
76# ------------------------------------------------------------------------------
77
78AM_V_XSLT = $(AM_V_XSLT_$(V))
79AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
80AM_V_XSLT_0 = @echo " XSLT " $@;
81
82# ------------------------------------------------------------------------------
83
84dist_doc_DATA = \
85 README \
86 docs/CODING_STYLE \
87 docs/COPYING
88
89dist_sbin_SCRIPTS = \
90 src/dhclient-script \
91 src/firewall-config \
92 src/firewall4 \
93 src/firewall6 \
94 src/network
95
96network_SCRIPTS = \
97 src/functions/functions
98
99CLEANFILES += \
100 src/functions/functions
101
102EXTRA_DIST += \
103 src/functions/functions.in
104
105dist_network_SCRIPTS = \
106 src/functions/functions.at \
107 src/functions/functions.auth \
108 src/functions/functions.bonding \
109 src/functions/functions.bridge \
110 src/functions/functions.cli \
111 src/functions/functions.cli.firewall \
112 src/functions/functions.colors \
113 src/functions/functions.config \
114 src/functions/functions.conntrack \
115 src/functions/functions.constants \
116 src/functions/functions.constants-firewall \
117 src/functions/functions.db \
118 src/functions/functions.description \
119 src/functions/functions.device \
120 src/functions/functions.dhclient \
121 src/functions/functions.dhcpd \
122 src/functions/functions.distro \
123 src/functions/functions.dns \
124 src/functions/functions.dummy \
125 src/functions/functions.editor \
126 src/functions/functions.firewall \
127 src/functions/functions.firewall-policy \
128 src/functions/functions.firewall-zones \
129 src/functions/functions.he \
130 src/functions/functions.hook \
131 src/functions/functions.hostapd \
132 src/functions/functions.hotplug \
133 src/functions/functions.http \
134 src/functions/functions.interrupts \
135 src/functions/functions.ip \
136 src/functions/functions.ipsec \
137 src/functions/functions.ipsec-pool \
138 src/functions/functions.iptables \
139 src/functions/functions.ip-tunnel \
140 src/functions/functions.ipv4 \
141 src/functions/functions.ipv6 \
142 src/functions/functions.list \
143 src/functions/functions.lock \
144 src/functions/functions.logging \
145 src/functions/functions.macros \
146 src/functions/functions.modem \
147 src/functions/functions.phy \
148 src/functions/functions.ports \
149 src/functions/functions.ppp \
150 src/functions/functions.pppoe-server \
151 src/functions/functions.radvd \
152 src/functions/functions.route \
153 src/functions/functions.routing \
154 src/functions/functions.serial \
155 src/functions/functions.service \
156 src/functions/functions.settings \
157 src/functions/functions.stp \
158 src/functions/functions.sysctl \
159 src/functions/functions.system \
160 src/functions/functions.triggers \
161 src/functions/functions.usb \
162 src/functions/functions.util \
163 src/functions/functions.vlan \
164 src/functions/functions.vpn \
165 src/functions/functions.vpn-security-policies \
166 src/functions/functions.wireless \
167 src/functions/functions.wireless-networks \
168 src/functions/functions.wpa_supplicant \
169 src/functions/functions.zone \
170 src/network-radvd-config \
171 src/dhclient-helper \
172 src/header-config \
173 src/header-port \
174 src/header-zone \
175 src/ppp/dialer \
176 src/ppp/pppoe-server
177
178dist_helpers_SCRIPTS = \
179 src/helpers/dhcpd-config-helper \
180 src/helpers/firewall-kernel-init \
181 src/helpers/hostapd-config-helper \
182 src/helpers/ipsec-updown \
183 src/helpers/pppd-angel \
184 src/helpers/wpa_supplicant
185
186bin_PROGRAMS = \
187 src/inetcalc
188
189src_inetcalc_SOURCES = \
190 src/inetcalc.c
191
192dist_hooks_configs_SCRIPTS = \
193 src/hooks/configs/dhcp \
194 src/hooks/configs/ipv4-static \
195 src/hooks/configs/ipv6-auto \
196 src/hooks/configs/ipv6-static \
197 src/hooks/configs/pppoe-server
198
199dist_hooks_ports_SCRIPTS = \
200 src/hooks/ports/bonding \
201 src/hooks/ports/dummy \
202 src/hooks/ports/ethernet \
203 src/hooks/ports/vlan \
204 src/hooks/ports/wireless-ap \
205 src/hooks/ports/wireless-mesh
206
207dist_hooks_zones_SCRIPTS = \
208 src/hooks/zones/6to4-tunnel \
209 src/hooks/zones/bridge \
210 src/hooks/zones/modem \
211 src/hooks/zones/pppoe \
212 src/hooks/zones/wireless
213
214# ------------------------------------------------------------------------------
215
216ppp_SCRIPTS = \
217 src/ppp/ip-updown
218
219CLEANFILES += \
220 src/ppp/ip-updown
221
222EXTRA_DIST += \
223 src/ppp/ip-updown.in
224
225INSTALL_DIRS += \
226 $(pppdir) \
227 $(logdir)
228
229ppp-install-hook:
230 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-pre-up
231 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-up
232 ln -svf ip-updown $(DESTDIR)$(pppdir)/ip-down
233 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-up
234 ln -svf ip-updown $(DESTDIR)$(pppdir)/ipv6-down
235
236ppp-uninstall-hook:
237 rm -f $(DESTDIR)$(pppdir)/ip-{down,pre-up,up}
238 rm -f $(DESTDIR)$(pppdir)/ipv6-{down,up}
239
240INSTALL_EXEC_HOOKS += ppp-install-hook
241UNINSTALL_EXEC_HOOKS += ppp-uninstall-hook
242
243# ------------------------------------------------------------------------------
244
245if HAVE_SYSTEMD
246systemdsystemunit_DATA = \
247 src/systemd/firewall4.service \
248 src/systemd/firewall6.service \
249 src/systemd/firewall-init.service \
250 src/systemd/network-init.service \
251 src/systemd/network@.service
252
253CLEANFILES += \
254 $(systemdsystemunit_DATA)
255
256INSTALL_DIRS += \
257 $(systemdsystemunitdir)
258endif
259
260EXTRA_DIST += \
261 src/systemd/firewall4.service.in \
262 src/systemd/firewall6.service.in \
263 src/systemd/firewall-init.service.in \
264 src/systemd/network-init.service.in \
265 src/systemd/network@.service.in
266
267# ------------------------------------------------------------------------------
268
269systemconfig_vpndir = $(systemconfigdir)/vpn
270
271dist_systemconfig_vpn_security_policies_DATA = \
272 config/vpn/security-policies/performance \
273 config/vpn/security-policies/system
274
275systemconfig_vpn_security_policiesdir = $(systemconfig_vpndir)/security-policies
276
277# ------------------------------------------------------------------------------
278
279dist_sysctl_DATA = \
280 src/sysctl/network.conf
281
282# ------------------------------------------------------------------------------
283
284dist_bashcompletion_SCRIPTS = \
285 src/bash-completion/network
286
287# ------------------------------------------------------------------------------
288
289dist_tmpfiles_DATA = \
290 src/tmpfiles/network.conf
291
292# ------------------------------------------------------------------------------
293
294if HAVE_UDEV
295dist_udev_SCRIPTS = \
296 src/udev/network-hotplug \
297 src/udev/network-hotplug-rename \
298 src/udev/network-hotplug-serial
299
300dist_udevrules_DATA = \
301 src/udev/rules.d/50-serial-whitelist.rules \
302 src/udev/rules.d/60-net.rules
303
304INSTALL_DIRS += \
305 $(udevdir) \
306 $(udevrulesdir)
307endif
308
309# ------------------------------------------------------------------------------
310
311pkgconfigdata_DATA = \
312 src/network.pc
313
314CLEANFILES += \
315 $(pkgconfigdata_DATA)
316
317EXTRA_DIST += \
318 src/network.pc.in
319
320# ------------------------------------------------------------------------------
321
322dist_macros_DATA = \
323 src/macros/DHCP \
324 src/macros/HTTP \
325 src/macros/HTTPS \
326 src/macros/WWW
327
328# ------------------------------------------------------------------------------
329
330INSTALL_DIRS += \
331 $(triggersdir)
332
333# ------------------------------------------------------------------------------
334
335MANPAGES = \
336 man/firewall-settings.8 \
337 man/network.8 \
338 man/network-color.8 \
339 man/network-description.8 \
340 man/network-device.8 \
341 man/network-dhcp.8 \
342 man/network-dns-server.8 \
343 man/network-performance-tuning.8 \
344 man/network-port.8 \
345 man/network-quick-start.8 \
346 man/network-route.8 \
347 man/network-route-static.8 \
348 man/network-settings.8 \
349 man/network-zone.8 \
350 man/network-zone-6to4-tunnel.8 \
351 man/network-zone-bridge.8 \
352 man/network-zone-config-pppoe-server.8 \
353 man/network-zone-modem.8 \
354 man/network-zone-pppoe.8 \
355 man/network-zone-wireless.8
356
357MANPAGES_XML = $(patsubst %.8,%.xml,$(MANPAGES))
358MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
359
360.PHONY: man
361man: $(MANPAGES) $(MANPAGES_HTML)
362
363man_MANS = \
364 $(MANPAGES)
365
366noinst_DATA += \
367 $(MANPAGES_HTML)
368
369CLEANFILES += \
370 $(man_MANS) \
371 $(MANPAGES_HTML)
372
373EXTRA_DIST += \
374 $(MANPAGES_XML) \
375 man/custom-html.xsl
376
377XSLTPROC_FLAGS = \
378 --nonet \
379 --stringparam man.output.quietly 1 \
380 --stringparam funcsynopsis.style ansi \
381 --stringparam man.th.extra1.suppress 1 \
382 --stringparam man.authors.section.enabled 1 \
383 --stringparam man.copyright.section.enabled 1
384
385XSLTPROC_COMMAND_MAN = \
386 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
387 http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
388
389XSLTPROC_COMMAND_HTML = \
390 $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
391
392man/%.8: man/%.xml
393 $(XSLTPROC_COMMAND_MAN)
394
395man/%.html: man/%.xml man/custom-html.xsl
396 $(XSLTPROC_COMMAND_HTML)
397
398# ------------------------------------------------------------------------------
399
400substitutions = \
401 '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
402 '|PACKAGE_URL=$(PACKAGE_URL)|' \
403 '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
404 '|prefix=$(prefix)|' \
405 '|exec_prefix=$(exec_prefix)|' \
406 '|sbindir=$(sbindir)|' \
407 '|networkdir=$(networkdir)|' \
408 '|helpersdir=$(helpersdir)|'
409
410SED_PROCESS = \
411 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
412 $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
413 < $< > $@
414
415src/functions/functions: src/functions/functions.in Makefile
416 $(SED_PROCESS)
417
418src/ppp/ip-updown: src/ppp/ip-updown.in Makefile
419 $(SED_PROCESS)
420
421src/systemd/%: src/systemd/%.in Makefile
422 $(SED_PROCESS)
423
424src/%.pc: src/%.pc.in Makefile
425 $(SED_PROCESS)
426
427INSTALL_DIRS += \
428 $(sbindir)
429
430install-exec-hook: $(INSTALL_EXEC_HOOKS)
431
432uninstall-hook: $(UNINSTALL_EXEC_HOOKS)
433
434# - testsuite ------------------------------------------------------------------
435
436TESTS_ENVIRONMENT = \
437 PATH=$(top_builddir)/src:$(PATH) \
438 functions=$(abs_builddir)/src/functions/functions \
439 networkdir=$(abs_srcdir)/src/functions \
440 testdir=$(top_srcdir)/test
441
442dist_check_DATA = \
443 test/constants.sh \
444 test/test-functions
445
446dist_check_SCRIPTS = \
447 $(TESTS)
448
449TESTS = \
450 test/load-library \
451 test/functions/ip/ip_detect_protocol \
452 test/functions/ip/ip_get_prefix \
453 test/functions/ip/ip_net_is_valid \
454 test/functions/ip/ip_is_valid \
455 test/functions/ip/ip_network_is_subnet_of \
456 test/functions/ip/ip_prefix_is_valid \
457 test/functions/ip/ip_protocol_is_supported \
458 test/functions/ip/ip_split_prefix