forked from jpterry/pcapsipdump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (23 loc) · 1.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#uncommend next line for regex support
#DEFS ?= -DUSE_REGEXP
LIBS ?= -lpcap -lstdc++
all: pcapsipdump
pcapsipdump: pcapsipdump.cpp calltable.cpp calltable.h
@$(CXX) $(CPPFLAGS) $(LDFLAGS) $(LIBS) $(DEFS) makefile-helpers/check_libpcap.c -o /dev/null $(LIBS) 2>/dev/null || (\
echo "Required library not found: pcap "; \
echo "Please install it in your distribution-specific manner, e.g.:"; \
echo " yum install libpcap-devel"; \
echo " apt-get install libpcap-dev"; \
echo " cd ~ports/net/libpcap && make install"; \
false)
$(CXX) $(CPPFLAGS) $(LDFLAGS) $(DEFS) pcapsipdump.cpp calltable.cpp -o pcapsipdump $(LIBS)
pcapsipdump-debug: pcapsipdump.cpp calltable.cpp calltable.h
$(CXX) $(CPPFLAGS) $(LDFLAGS) $(DEFS) -ggdb pcapsipdump.cpp calltable.cpp -o pcapsipdump-debug $(LIBS)
clean:
rm -f pcapsipdump
install:
install pcapsipdump ${DESTDIR}/usr/sbin/pcapsipdump
install redhat/pcapsipdump.init ${DESTDIR}/etc/rc.d/init.d/pcapsipdump
install redhat/pcapsipdump.sysconfig ${DESTDIR}/etc/sysconfig/pcapsipdump
mkdir -p ${DESTDIR}/var/spool/pcapsipdump
chmod 0700 ${DESTDIR}/var/spool/pcapsipdump