1.0 uses original separator, no need to change prads
[prads.git] / Makefile
blob9c8b5507c07b17dbcad596079bb9790b2ab1ce8a
1 PREFIX=/usr/local
2 BINDIR=${PREFIX}/bin
3 CONFDIR=${PREFIX}/etc/prads
4 MANDIR=${PREFIX}/share/man/man1
5 DOCUTIL=rst2man
6 INSTALLGROUP=root
8 ifeq ($(UNAME), FreeBSD)
9 DOCUTIL=rst2man.py
10 INSTALLGROUP=wheel
11 endif
13 build:
14 @echo "You need libpcre-dev and libpcap-dev to compile this program."
15 ${MAKE} CONFDIR=${CONFDIR} -C src/
17 clean:
18 ${MAKE} -C src/ $@
19 rm -f doc/prads.1 doc/prads.1.gz
20 rm -f doc/prads-wirefuzz.1 doc/prads-wirefuzz.1.gz
21 rm -f doc/prads-asset-report.1 doc/prads-asset-report.1.gz
22 rm -f doc/prads2snort.1 doc/prads2snort.1.gz
24 .PHONY: man
25 man: doc/prads.1.gz doc/prads-asset-report.1.gz doc/prads-wirefuzz.1.gz doc/prads2snort.1.gz
27 doc/%.1.gz: doc/%.1
28 @>$@<$< gzip -9
30 doc/%.1: doc/%.man
31 ${DOCUTIL} $< >$@
33 install: man
34 # binaries
35 install -d ${DESTDIR}${BINDIR}
36 install -m 755 -o root -g ${INSTALLGROUP} src/prads ${DESTDIR}${BINDIR}/prads
37 install -m 755 -o root -g ${INSTALLGROUP} tools/prads-asset-report ${DESTDIR}${BINDIR}/prads-asset-report
38 install -m 755 -o root -g ${INSTALLGROUP} tools/prads2snort ${DESTDIR}${BINDIR}/prads2snort
39 # config
40 install -d ${DESTDIR}${CONFDIR}
41 install -C -m 644 -o root -g ${INSTALLGROUP} etc/prads.conf ${DESTDIR}${CONFDIR}/
42 # fingerprints
43 #install -m 644 -o root -g ${INSTALLGROUP} etc/osi.fp ${DESTDIR}${CONFDIR}/
44 #install -m 644 -o root -g ${INSTALLGROUP} etc/oso.fp ${DESTDIR}${CONFDIR}/
45 #install -m 644 -o root -g ${INSTALLGROUP} etc/osu.fp ${DESTDIR}${CONFDIR}/
46 install -m 644 -o root -g ${INSTALLGROUP} etc/tcp-syn.fp ${DESTDIR}${CONFDIR}/
47 install -m 644 -o root -g ${INSTALLGROUP} etc/tcp-synack.fp ${DESTDIR}${CONFDIR}/
48 install -m 644 -o root -g ${INSTALLGROUP} etc/tcp-fin.fp ${DESTDIR}${CONFDIR}/
49 install -m 644 -o root -g ${INSTALLGROUP} etc/tcp-rst.fp ${DESTDIR}${CONFDIR}/
50 install -m 644 -o root -g ${INSTALLGROUP} etc/tcp-stray-ack.fp ${DESTDIR}${CONFDIR}/
51 # signatures
52 install -C -m 644 -o root -g ${INSTALLGROUP} etc/eth.sig ${DESTDIR}${CONFDIR}/
53 install -C -m 644 -o root -g ${INSTALLGROUP} etc/icmp-data.sig ${DESTDIR}${CONFDIR}/
54 install -C -m 644 -o root -g ${INSTALLGROUP} etc/mac.sig ${DESTDIR}${CONFDIR}/
55 install -C -m 644 -o root -g ${INSTALLGROUP} etc/mtu.sig ${DESTDIR}${CONFDIR}/
56 install -C -m 644 -o root -g ${INSTALLGROUP} etc/os.sig ${DESTDIR}${CONFDIR}/
57 install -C -m 644 -o root -g ${INSTALLGROUP} etc/tcp-clients.sig ${DESTDIR}${CONFDIR}/
58 install -C -m 644 -o root -g ${INSTALLGROUP} etc/tcp-service.sig ${DESTDIR}${CONFDIR}/
59 install -C -m 644 -o root -g ${INSTALLGROUP} etc/udp-service.sig ${DESTDIR}${CONFDIR}/
60 install -C -m 644 -o root -g ${INSTALLGROUP} etc/service-string.sig ${DESTDIR}${CONFDIR}/
61 install -C -m 644 -o root -g ${INSTALLGROUP} etc/web-application.sig ${DESTDIR}${CONFDIR}/
62 # ports
63 install -d ${DESTDIR}${CONFDIR}
64 install -C -m 644 -o root -g ${INSTALLGROUP} etc/udp.ports ${DESTDIR}${CONFDIR}/
65 install -d ${DESTDIR}${CONFDIR}/init.d
66 install -m 755 -o root -g ${INSTALLGROUP} doc/prads.rc ${DESTDIR}${CONFDIR}/init.d/
67 # man pages
68 install -d ${DESTDIR}${MANDIR}
69 install -m 644 -o root -g ${INSTALLGROUP} doc/prads.1.gz ${DESTDIR}${MANDIR}/
70 install -m 644 -o root -g ${INSTALLGROUP} doc/prads-asset-report.1.gz ${DESTDIR}${MANDIR}/
71 install -m 644 -o root -g ${INSTALLGROUP} doc/prads2snort.1.gz ${DESTDIR}${MANDIR}/
74 .PHONY: build clean install