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