add simple nflog daemon
[pve-firewall.git] / src / Makefile
CommitLineData
bb272dd3
DM
1
2PREFIX=/usr
3BINDIR=${PREFIX}/bin
ba0b3a0a 4SBINDIR=${PREFIX}/sbin
bb272dd3
DM
5MANDIR=${PREFIX}/share/man
6DOCDIR=${PREFIX}/share/doc
7MAN1DIR=${MANDIR}/man1/
8PERLDIR=${PREFIX}/share/perl5
9
10LIB_SOURCES= \
11 Firewall.pm
12
ba0b3a0a
DM
13all: pvefw-logger
14
15CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
16CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
17LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
18
19pvefw-logger: pvefw-logger.c
20 gcc -Wall -Werror pvefw-logger.c -o pvefw-logger -std=gnu99 \
21 $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
22 $(shell pkg-config libnetfilter_log glib-2.0 gthread-2.0 --libs --cflags)
bb272dd3
DM
23
24.PHONY: install
ba0b3a0a 25install: pvefw pvefw-logger
bb272dd3
DM
26 install -d -m 0755 ${DESTDIR}/${SBINDIR}
27 install -m 0755 pvefw ${DESTDIR}/${SBINDIR}
ba0b3a0a 28 install -m 0755 --strip pvefw-logger ${DESTDIR}/${SBINDIR}
bb272dd3
DM
29 install -d -m 0755 ${DESTDIR}${PERLDIR}/PVE
30 for i in ${LIB_SOURCES}; do install -D -m 0644 PVE/$$i ${DESTDIR}${PERLDIR}/PVE/$$i; done
31
32
33.PHONY: clean
34clean:
35 rm -rf *~
36
37.PHONY: distclean
38distclean: clean
39