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