convert pve-firewall into a PVE::Service class
[pve-firewall.git] / src / Makefile
CommitLineData
bb272dd3 1
8f119284
DM
2export PREFIX=/usr
3export BINDIR=${PREFIX}/bin
4export SBINDIR=${PREFIX}/sbin
5export MANDIR=${PREFIX}/share/man
a0f1d07b 6export DOCDIR=${PREFIX}/share/doc/pve-firewall
feac0850 7export PODDIR=${DOCDIR}/pod
8f119284
DM
8export MAN1DIR=${MANDIR}/man1/
9export PERLDIR=${PREFIX}/share/perl5
bb272dd3 10
16adff04
DM
11all: pve-firewall.1 pvefw-logger
12
13%.1: %.1.pod
14 rm -f $@
15 cat $<|pod2man -n $* -s 1 -r ${VERSION} -c "Proxmox Documentation" >$@
16
17pve-firewall.1.pod: pve-firewall
18 perl -I.. ./pve-firewall printmanpod >$@
ba0b3a0a
DM
19
20CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
21CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
22LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
23
24pvefw-logger: pvefw-logger.c
e134b263 25 gcc -Wall -Werror pvefw-logger.c -o pvefw-logger -std=gnu99 \
ba0b3a0a
DM
26 $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
27 $(shell pkg-config libnetfilter_log glib-2.0 gthread-2.0 --libs --cflags)
bb272dd3
DM
28
29.PHONY: install
feac0850 30install: pve-firewall pve-firewall.1 pve-firewall.1.pod pvefw-logger
8f119284 31 make -C PVE install
bb272dd3 32 install -d -m 0755 ${DESTDIR}/${SBINDIR}
e2beb7aa 33 install -m 0755 pve-firewall ${DESTDIR}/${SBINDIR}
ba0b3a0a 34 install -m 0755 --strip pvefw-logger ${DESTDIR}/${SBINDIR}
feac0850
DM
35 install -d ${DESTDIR}/${MAN1DIR}
36 install -m 0644 pve-firewall.1 ${DESTDIR}/${MAN1DIR}
37 install -d ${DESTDIR}/${PODDIR}
38 install -m 0644 pve-firewall.1.pod ${DESTDIR}/${PODDIR}
39
bb272dd3
DM
40
41.PHONY: clean
42clean:
8f119284 43 make -C PVE clean
3f665549 44 rm -rf *~ pvefw-logger
bb272dd3
DM
45
46.PHONY: distclean
47distclean: clean
48