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