Makefile.in 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Makefile for tcpreplay.
  2. #
  3. # dugsong@anzen.com
  4. PREFIX = @prefix@
  5. SBINDIR = $(PREFIX)/sbin
  6. MANDIR = $(PREFIX)/man/man8
  7. CC = @CC@
  8. CFLAGS = @CFLAGS@
  9. LDFLAGS = @LDFLAGS@
  10. DEFS = @DEFS@
  11. INCS = $(LNETINCS) $(PCAPINCS)
  12. LIBS = @LIBS@ $(LNETLIBS) $(PCAPLIBS)
  13. INSTALL = @INSTALL@
  14. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  15. PCAPDIR = libpcap-0.4
  16. PCAPINCS = -I$(PCAPDIR)
  17. PCAPLIBS = -L$(PCAPDIR) -lpcap
  18. PCAPDEP = $(PCAPDIR)/pcap.h $(PCAPDIR)/libpcap.a
  19. LNETDIR = Libnet-0.99
  20. LNETINCS = -I$(LNETDIR)/include
  21. LNETLIBS = -L$(LNETDIR)/lib -lnet
  22. LNETDEP = $(LNETDIR)/include/libnet.h $(LNETDIR)/libnet.a
  23. PROGRAMS = tcpreplay
  24. all: $(PROGRAMS)
  25. tcpreplay: $(PCAPDEP) $(LNETDEP) tcpreplay.c
  26. -rm -f tcpreplay
  27. $(CC) $(CFLAGS) $(DEFS) $(INCS) -o $@ tcpreplay.c $(LDFLAGS) $(LIBS)
  28. $(PCAPDIR)/libpcap.a:
  29. cd $(PCAPDIR) ; $(MAKE)
  30. $(LNETDIR)/libnet.a:
  31. cd $(LNETDIR) ; $(MAKE)
  32. clean:
  33. cd $(PCAPDIR) ; $(MAKE) clean
  34. cd $(LNETDIR) ; $(MAKE) clean
  35. rm -f *~ *.o *core $(PROGRAMS)
  36. distclean: clean
  37. cd $(PCAPDIR) ; $(MAKE) distclean
  38. cd $(LNETDIR) ; $(MAKE) distclean
  39. rm -f Makefile config.h config.status config.cache config.log
  40. install:
  41. $(INSTALL_PROGRAM) -m 755 tcpreplay $(SBINDIR)
  42. $(INSTALL) -m 644 tcpreplay.8 $(MANDIR)
  43. uninstall:
  44. rm -f $(SBINDIR)/tcpreplay
  45. rm -f $(MANDIR)/tcpreplay.8