daemon: cleanup '+' character at begin of line
[pve-firewall.git] / src / Makefile
... / ...
CommitLineData
1
2export PREFIX=/usr
3export BINDIR=${PREFIX}/bin
4export SBINDIR=${PREFIX}/sbin
5export MANDIR=${PREFIX}/share/man
6export DOCDIR=${PREFIX}/share/doc/pve-firewall
7export MAN1DIR=${MANDIR}/man1/
8export MAN8DIR=${MANDIR}/man8/
9export PERLDIR=${PREFIX}/share/perl5
10export BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions
11
12export NOVIEW=1
13include /usr/share/pve-doc-generator/pve-doc-generator.mk
14
15all: pve-firewall.8 pvefw-logger
16
17pve-firewall.bash-completion: PVE/Service/pve_firewall.pm
18 perl -I. -T -e "use PVE::Service::pve_firewall; PVE::Service::pve_firewall->generate_bash_completions();" >$@.tmp
19 mv $@.tmp $@
20
21CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
22CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
23LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
24
25pvefw-logger: pvefw-logger.c
26 gcc -Wall -Werror pvefw-logger.c -o pvefw-logger -std=gnu99 \
27 $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
28 $(shell pkg-config libnetfilter_log libnetfilter_conntrack glib-2.0 --libs --cflags)
29
30.PHONY: install
31install: pve-firewall pve-firewall.8 pve-firewall.bash-completion pvefw-logger
32 make -C PVE install
33 install -d -m 0755 ${DESTDIR}/${SBINDIR}
34 install -m 0755 pve-firewall ${DESTDIR}/${SBINDIR}
35 install -m 0755 pvefw-logger ${DESTDIR}/${SBINDIR}
36 install -d ${DESTDIR}/${MAN8DIR}
37 install -m 0644 pve-firewall.8 ${DESTDIR}/${MAN8DIR}
38 install -m 0644 -D pve-firewall.bash-completion ${DESTDIR}/${BASHCOMPLDIR}/pve-firewall
39 install -d -m 0755 ${DESTDIR}/usr/lib/sysctl.d/
40 install -m 0644 pve-firewall-sysctl.conf ${DESTDIR}/usr/lib/sysctl.d/pve-firewall.conf
41
42.PHONY: clean
43clean:
44 make -C PVE clean
45 make cleanup-docgen
46 rm -rf pvefw-logger
47 find . -name '*~' -exec rm {} ';'
48
49
50.PHONY: distclean
51distclean: clean
52