# Makefile for tcpreplay. # # dugsong@anzen.com PREFIX = @prefix@ SBINDIR = $(PREFIX)/sbin MANDIR = $(PREFIX)/man/man8 CC = @CC@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ DEFS = @DEFS@ INCS = $(LNETINCS) $(PCAPINCS) LIBS = @LIBS@ $(LNETLIBS) $(PCAPLIBS) INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ PCAPDIR = libpcap-0.4 PCAPINCS = -I$(PCAPDIR) PCAPLIBS = -L$(PCAPDIR) -lpcap PCAPDEP = $(PCAPDIR)/pcap.h $(PCAPDIR)/libpcap.a LNETDIR = Libnet-0.99 LNETINCS = -I$(LNETDIR)/include LNETLIBS = -L$(LNETDIR)/lib -lnet LNETDEP = $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a PROGRAMS = tcpreplay all: $(PROGRAMS) tcpreplay: $(PCAPDEP) $(LNETDEP) tcpreplay.c -rm -f tcpreplay $(CC) $(CFLAGS) $(DEFS) $(INCS) -o $@ tcpreplay.c $(LDFLAGS) $(LIBS) $(PCAPDIR)/libpcap.a: cd $(PCAPDIR) ; $(MAKE) $(LNETDIR)/libnet.a: cd $(LNETDIR) ; $(MAKE) clean: cd $(PCAPDIR) ; $(MAKE) clean cd $(LNETDIR) ; $(MAKE) clean rm -f *~ *.o *core $(PROGRAMS) distclean: clean cd $(PCAPDIR) ; $(MAKE) distclean cd $(LNETDIR) ; $(MAKE) distclean rm -f Makefile config.h config.status config.cache config.log install: $(INSTALL_PROGRAM) -m 755 tcpreplay $(SBINDIR) $(INSTALL) -m 644 tcpreplay.8 $(MANDIR) uninstall: rm -f $(SBINDIR)/tcpreplay rm -f $(MANDIR)/tcpreplay.8