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