# $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