forked from appneta/tcpreplay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
132 lines (104 loc) · 3.51 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# $Id: Makefile.in,v 1.39 2003/04/29 19:32:13 aturner Exp $
prefix = @prefix@
BINDIR = ${prefix}/bin
SBINDIR = ${prefix}/sbin
MAN8DIR = @mandir@/man8
MAN1DIR = @mandir@/man1
VERSION = @TCPREPLAY_VERSION@
RELEASEDIR = tcpreplay-$(VERSION)
CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DEFS = @DEFS@
INCS = @LNETINC@ -I. -Ilibredblack
LIBS = @LIBS@ @LNETLIB@ @LPCAPLIB@
INSTALL = @INSTALL@
BINARIES = tcpreplay capinfo tcpprep pcapmerge
TSRCS = tcpreplay.c timer.c cache.c cidr.c do_packets.c list.c xX.c err.c signal_handler.c
TOBJS = $(TSRCS:.c=.o)
CSRCS = capinfo.c libpcap.c snoop.c timer.c err.c
COBJS = $(CSRCS:.c=.o)
PSRCS = tcpprep.c cidr.c tree.c cache.c list.c xX.c err.c
POBJS = $(PSRCS:.c=.o)
MSRCS = pcapmerge.c err.c
MOBJS = $(MSRCS:.c=.o)
.c.o:
$(CC) $(CFLAGS) $(INCS) -c $*.c
.PHONY: test
all: libredblack $(BINARIES)
tcpprep: $(POBJS)
$(CC) $(CFLAGS) $(DEFS) $(INCS) -o $@ $(POBJS) $(LDFLAGS) $(LIBS) libredblack/.libs/libredblack.a
tcpreplay: $(TOBJS)
$(CC) $(CFLAGS) $(DEFS) $(INCS) -o $@ $(TOBJS) $(LDFLAGS) $(LIBS)
capinfo: $(COBJS)
$(CC) $(CFLAGS) $(DEFS) $(INCS) -o $@ $(COBJS) $(LDFLAGS) $(LIBS)
pcapmerge: $(MOBJS)
$(CC) $(CFLAGS) $(DEFS) -o $@ $(MOBJS) $(LDFLAGS) -lpcap
libredblack: libredblack/.libs/libredblack.a
libredblack/.libs/libredblack.a:
cd libredblack && make
clean:
-rm -f *.o *core $(BINARIES)
-cd libredblack && make clean
-cd test && make clean
-cd Docs && make clean
distclean: clean
-rm -rf autom4te-2.??.cache
-rm -f Makefile config.h config.status config.cache config.log *~
-rm -f tcpreplay.spec confdefs.h
-cd libredblack && make distclean
-cd test && make distclean
-cd Docs && make distclean
install:
test -d $(SBINDIR) || $(INSTALL) -d $(SBINDIR)
test -d $(BINDIR) || $(INSTALL) -d $(BINDIR)
test -d $(MAN8DIR) || $(INSTALL) -d $(MAN8DIR)
test -d $(MAN1DIR) || $(INSTALL) -d $(MAN1DIR)
$(INSTALL) -m 755 tcpreplay $(SBINDIR)
$(INSTALL) -m 755 capinfo $(BINDIR)
$(INSTALL) -m 755 tcpprep $(BINDIR)
$(INSTALL) -m 755 pcapmerge $(BINDIR)
$(INSTALL) -m 644 man/tcpreplay.8 $(MAN8DIR)
$(INSTALL) -m 644 man/capinfo.1 $(MAN1DIR)
$(INSTALL) -m 644 man/tcpprep.1 $(MAN1DIR)
$(INSTALL) -m 644 man/pcapmerge.1 $(MAN1DIR)
uninstall:
rm -f $(SBINDIR)/tcpreplay
rm -f $(MAN8DIR)/tcpreplay.8
rm -f $(BINDIR)/capinfo
rm -f $(MAN1DIR)/capinfo.1
rm -f $(BINDIR)/tcpprep
rm -f $(MAN1DIR)/tcpprep.1
rm -f ($BINDIR)/pcapmerge
rm -f $(MAN1DIR)/pcapmerge.1
pretty:
indent -br -brs -ts8 -ncdw -nce -ncs -npcs -nprs -l80 -lc80 -lp -psl -i4 *.c *.h
test:
cd test && make
docs:
cd Docs && make
release:
mkdir ../$(RELEASEDIR)
cp -r * ../$(RELEASEDIR)/
cd ../$(RELEASEDIR) && make distclean
-cd ../$(RELEASEDIR)/Docs && make
rm -rf ../$(RELEASEDIR)/CVS ../$(RELEASEDIR)/test/CVS ../$(RELEASEDIR)/Docs/CVS
cd .. && tar zcvf $(RELEASEDIR).tar.gz $(RELEASEDIR)/*
rerelease:
-rm -rf ../$(RELEASEDIR) ../$(RELEASEDIR).tar.gz
mkdir ../$(RELEASEDIR)
cp -r * ../$(RELEASEDIR)/
cd ../$(RELEASEDIR) && make distclean
-cd ../$(RELEASEDIR)/Docs && make
rm -rf ../$(RELEASEDIR)/CVS ../$(RELEASEDIR)/test/CVS ../$(RELEASEDIR)/Docs/CVS
cd .. && tar zcvf $(RELEASEDIR).tar.gz $(RELEASEDIR)/*
srpm:
-rm -rf ../$(RELEASEDIR) ../$(RELEASEDIR).tar.gz
mkdir ../$(RELEASEDIR)
cp -r * ../$(RELEASEDIR)/
cd ../$(RELEASEDIR) && mv tcpreplay.spec tcpreplay.SPEC
cd ../$(RELEASEDIR) && make distclean
cd ../$(RELEASEDIR) && mv tcpreplay.SPEC tcpreplay.spec
-cd ../$(RELEASEDIR)/Docs && make
cd .. && tar zcvf $(RELEASEDIR).tar.gz $(RELEASEDIR)/*
rpm -ts ../$(RELEASEDIR).tar.gz --nodeps