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 `libnet-config --defines` -Dwrite_link_layer=libnet_write_link_layer -Dopen_link_interface=libnet_open_link_interface
- LNETLIBS = `libnet-config --libs`
- LNETDEP = $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
- PROGRAMS = tcpreplay
- all: $(PROGRAMS)
- tcpreplay: 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) -p -m 755 tcpreplay $(SBINDIR)/tcpreplay
- # $(INSTALL) -p -m 644 tcpreplay.8 $(MANDIR)/tcpreplay.8
- uninstall:
- rm -f $(SBINDIR)/tcpreplay
- rm -f $(MANDIR)/tcpreplay.8
|