Makefile.in 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. # $Id: Makefile.in 767 2004-10-06 12:48:49Z aturner $
  2. prefix = @prefix@
  3. BINDIR = ${prefix}/bin
  4. SBINDIR = ${prefix}/sbin
  5. MAN8DIR = @mandir@/man8
  6. MAN1DIR = @mandir@/man1
  7. VERSION = @TCPREPLAY_VERSION@
  8. RELEASEDIR = tcpreplay-$(VERSION)
  9. CC = @CC@
  10. CFLAGS = @CFLAGS@
  11. LDFLAGS = @LDFLAGS@
  12. DEFS = @DEFS@
  13. INCS = -I. @LNETINC@ @LPCAPINC@
  14. LIBS = @LIBS@ @LNETLIB@ @LPCAPLIB@
  15. LNAVLIB = @LNAVLIB@
  16. LNAV_CFLAGS = @LNAV_CFLAGS@
  17. INSTALL = @INSTALL@
  18. BINARIES = tcpreplay capinfo pcapmerge tcpprep flowreplay
  19. TSRCS = tcpreplay.c timer.c cache.c cidr.c do_packets.c list.c xX.c err.c signal_handler.c edit_packet.c replay_live.c fakepoll.c utils.c fakepcapnav.c tcpdump.c portmap.c fakepcap.c
  20. TOBJS = $(TSRCS:.c=.o)
  21. CSRCS = capinfo.c libpcap.c snoop.c timer.c err.c fakepcap.c
  22. COBJS = $(CSRCS:.c=.o)
  23. PSRCS = tcpprep.c cidr.c tree.c cache.c list.c xX.c err.c utils.c services.c fakepcap.c
  24. POBJS = $(PSRCS:.c=.o)
  25. MSRCS = pcapmerge.c err.c
  26. MOBJS = $(MSRCS:.c=.o)
  27. FSRCS = flowreplay.c flowkey.c flownode.c flowstate.c flowbuff.c cidr.c timer.c err.c utils.c
  28. FOBJS = $(FSRCS:.c=.o)
  29. .c.o:
  30. $(CC) $(CFLAGS) $(DEFS) $(INCS) -c $*.c
  31. .PHONY: test
  32. all: $(BINARIES)
  33. tags:
  34. etags *.h *.c
  35. tcpprep: $(POBJS)
  36. $(CC) $(CFLAGS) $(DEFS) $(INCS) -o $@ $(POBJS) $(LDFLAGS) $(LIBS)
  37. tcpreplay: $(TOBJS)
  38. $(CC) $(CFLAGS) $(LNAV_CFLAGS) $(DEFS) $(INCS) -o $@ $(TOBJS) $(LDFLAGS) $(LIBS) $(LNAVLIB)
  39. capinfo: $(COBJS)
  40. $(CC) $(CFLAGS) $(DEFS) $(INCS) -o $@ $(COBJS) $(LDFLAGS) $(LIBS)
  41. pcapmerge: $(MOBJS)
  42. $(CC) $(CFLAGS) $(DEFS) -o $@ $(MOBJS) $(LDFLAGS) $(LIBS)
  43. flowreplay: $(FOBJS)
  44. $(CC) $(CFLAGS) $(DEFS) -o $@ $(FOBJS) $(LDFLAGS) $(LIBS)
  45. dlt_names:
  46. cat /usr/include/net/bpf.h | ./scripts/dlt2name.pl
  47. clean:
  48. -rm -f *.o *core $(BINARIES)
  49. -cd test && make clean
  50. -cd Docs && make clean
  51. distclean: clean
  52. -rm -rf autom4te-2.??.cache autom4te.cache TAGS
  53. -rm -f Makefile config.h config.status config.cache config.log *~
  54. -rm -f tcpreplay.spec confdefs.h man/*~ scripts/*~
  55. -cd test && make distclean
  56. -cd Docs && make distclean
  57. install:
  58. test -d $(SBINDIR) || $(INSTALL) -d $(SBINDIR)
  59. test -d $(BINDIR) || $(INSTALL) -d $(BINDIR)
  60. test -d $(MAN8DIR) || $(INSTALL) -d $(MAN8DIR)
  61. test -d $(MAN1DIR) || $(INSTALL) -d $(MAN1DIR)
  62. $(INSTALL) -m 755 tcpreplay $(SBINDIR)
  63. $(INSTALL) -m 755 capinfo $(BINDIR)
  64. $(INSTALL) -m 755 tcpprep $(BINDIR)
  65. $(INSTALL) -m 755 pcapmerge $(BINDIR)
  66. $(INSTALL) -m 755 flowreplay $(BINDIR)
  67. $(INSTALL) -m 644 man/tcpreplay.8 $(MAN8DIR)
  68. $(INSTALL) -m 644 man/capinfo.1 $(MAN1DIR)
  69. $(INSTALL) -m 644 man/tcpprep.1 $(MAN1DIR)
  70. $(INSTALL) -m 644 man/pcapmerge.1 $(MAN1DIR)
  71. $(INSTALL) -m 644 man/flowreplay.1 $(MAN1DIR)
  72. uninstall:
  73. rm -f $(SBINDIR)/tcpreplay
  74. rm -f $(MAN8DIR)/tcpreplay.8
  75. rm -f $(BINDIR)/capinfo
  76. rm -f $(MAN1DIR)/capinfo.1
  77. rm -f $(BINDIR)/tcpprep
  78. rm -f $(MAN1DIR)/tcpprep.1
  79. rm -f $(BINDIR)/pcapmerge
  80. rm -f $(MAN1DIR)/pcapmerge.1
  81. rm -f $(BINDIR)/flowreplay
  82. rm -f $(MAN8DIR)/flowreplay.8
  83. pretty:
  84. indent -br -brs -ts4 -ncdw -nce -ncs -npcs -nprs -l80 -lc80 -lp -psl -i4 -nut *.c *.h
  85. test:
  86. cd test && make
  87. docs:
  88. cd Docs && make
  89. webdocs:
  90. scp Docs/FAQ.html Docs/FAQ.pdf Docs/CHANGELOG shell.sf.net:htdocs/
  91. release:
  92. mkdir ../$(RELEASEDIR)
  93. cp -r * ../$(RELEASEDIR)/
  94. cd ../$(RELEASEDIR) && make distclean
  95. -cd ../$(RELEASEDIR)/Docs && make
  96. rm -rf ../$(RELEASEDIR)/CVS ../$(RELEASEDIR)/test/CVS
  97. rm -rf ../$(RELEASEDIR)/Docs/CVS ../$(RELEASEDIR)/man/CVS
  98. cd .. && tar zcvf $(RELEASEDIR).tar.gz $(RELEASEDIR)/*
  99. rerelease:
  100. -rm -rf ../$(RELEASEDIR) ../$(RELEASEDIR).tar.gz
  101. mkdir ../$(RELEASEDIR)
  102. cp -r * ../$(RELEASEDIR)/
  103. cd ../$(RELEASEDIR) && make distclean
  104. -cd ../$(RELEASEDIR)/Docs && make
  105. rm -rf ../$(RELEASEDIR)/CVS ../$(RELEASEDIR)/test/CVS
  106. rm -rf ../$(RELEASEDIR)/Docs/CVS ../$(RELEASEDIR)/man/CVS
  107. cd .. && tar zcvf $(RELEASEDIR).tar.gz $(RELEASEDIR)/*
  108. srpm:
  109. -rm -rf ../$(RELEASEDIR) ../$(RELEASEDIR).tar.gz
  110. mkdir ../$(RELEASEDIR)
  111. cp -r * ../$(RELEASEDIR)/
  112. cd ../$(RELEASEDIR) && mv tcpreplay.spec tcpreplay.SPEC
  113. cd ../$(RELEASEDIR) && make distclean
  114. cd ../$(RELEASEDIR) && mv tcpreplay.SPEC tcpreplay.spec
  115. -cd ../$(RELEASEDIR)/Docs && make
  116. cd .. && tar zcvf $(RELEASEDIR).tar.gz $(RELEASEDIR)/*
  117. rpm -ts ../$(RELEASEDIR).tar.gz --nodeps