forked from sipcapture/sipgrep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
81 lines (61 loc) · 2.66 KB
/
Makefile.in
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#
# $Id: Makefile.in,v 1.23 2006/11/28 13:35:37 jpr5 Exp $
#
# Copyright (c) 2006 Jordan Ritter <jpr5@darkridge.com>
#
# Please refer to the LICENSE file for more information.
CC=@CC@
CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@
INCLUDES=-I@srcdir@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@
LDFLAGS=@LDFLAGS@ @PCAP_LINK@
LIBS=-lpcap @EXTRA_LIBS@
STRIPFLAG=@STRIPFLAG@
SRC=sipgrep.c sipparse.c ipreasm.c
OBJS=sipgrep.o sipparse.o ipreasm.o
TARGET=sipgrep
MANPAGE=sipgrep.8
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(prefix)/bin
datadir = $(prefix)/share
mandir = $(datadir)/man
BINDIR_INSTALL = $(prefix)/bin
MANDIR_INSTALL = $(mandir)/man8
INSTALL = ./install-sh
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(LIBS)
debug: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -g -o $(TARGET) $(OBJS) $(LIBS)
static: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET).static -static $(OBJS) $(LIBS)
install: $(TARGET)
$(INSTALL) -c -m 0755 $(TARGET) $(DESTDIR)/$(BINDIR_INSTALL)/$(TARGET)
$(INSTALL) -c -m 0644 $(MANPAGE) $(DESTDIR)/$(MANDIR_INSTALL)/$(MANPAGE)
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -g -c $<
clean:
rm -f *~ $(OBJS) $(TARGET) $(TARGET).static
distclean: clean
rm -f config.status config.cache config.log config.h Makefile
$(OBJS): Makefile sipgrep.c sipgrep.h
tardist:
@( VERSION=`perl -ne '/VERSION\s+"(.*)"/ && print "$$1\n"' sipgrep.h` ; \
PKG="sipgrep-$$VERSION" ; \
TMPDIR="/tmp" ; \
DESTDIR="$$TMPDIR/$$PKG" ; \
echo ; \
echo "Building package $$PKG ... " ; \
echo ; \
sleep 2 ; \
rm -rf $$DESTDIR && mkdir $$DESTDIR && \
make distclean && \
tar cf - . --exclude "CVS" | tar xf - -C $$DESTDIR && \
find $$DESTDIR -name "*~" -o -name ".*#*" | xargs rm -f && \
cd $$TMPDIR && tar jcf $$PKG.tar.bz2 $$PKG ; \
rm -rf $$DESTDIR ; \
cd $$TMPDIR && gpg -ba $$PKG.tar.bz2 ; \
echo ; \
ls -l $$TMPDIR/$$PKG.tar.bz2 $$TMPDIR/$$PKG.tar.bz2.asc ; \
echo ; \
)