prefix ipset chains with PVEFW-
[pve-firewall.git] / src / Makefile
1
2 export PREFIX=/usr
3 export BINDIR=${PREFIX}/bin
4 export SBINDIR=${PREFIX}/sbin
5 export MANDIR=${PREFIX}/share/man
6 export DOCDIR=${PREFIX}/share/doc
7 export MAN1DIR=${MANDIR}/man1/
8 export PERLDIR=${PREFIX}/share/perl5
9
10 all: pvefw-logger
11
12 CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
13 CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
14 LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
15
16 pvefw-logger: pvefw-logger.c
17         gcc -Wall -Werror pvefw-logger.c -o pvefw-logger -std=gnu99 \
18         $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
19         $(shell pkg-config libnetfilter_log glib-2.0 gthread-2.0 --libs --cflags)
20
21 .PHONY: install
22 install: pvefw pvefw-logger
23         make -C PVE install
24         install -d -m 0755 ${DESTDIR}/${SBINDIR}
25         install -m 0755 pvefw ${DESTDIR}/${SBINDIR}
26         install -m 0755 --strip pvefw-logger ${DESTDIR}/${SBINDIR}
27
28 .PHONY: clean
29 clean:  
30         make -C PVE clean
31         rm -rf *~ pvefw-logger
32
33 .PHONY: distclean
34 distclean: clean
35