1
0

Makefile.in 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. CC = @CC@ -fPIC
  2. CFLAGS = @CFLAGS@
  3. COMPILE = $(CC) $(CFLAGS) $(INCLUDES)
  4. LD = @CC@
  5. LDFLAGS = @LDFLAGS@
  6. RANLIB = @RANLIB@
  7. SYS_LIBS= @LIBS@
  8. prefix = @prefix@
  9. exec_prefix = @exec_prefix@
  10. bindir = @bindir@
  11. libdir = @libdir@
  12. includedir = @includedir@
  13. LIB_H = bgpdump_attr.h bgpdump_formats.h bgpdump_lib.h bgpdump_mstream.h
  14. LIB_O = bgpdump_lib.o bgpdump_mstream.o cfile_tools.o util.o inet_ntop.o
  15. OTHER = *.in configure bgpdump.spec README* ChangeLog License*
  16. all: libbgpdump.so bgpdump
  17. libbgpdump.a: $(LIB_H) $(LIB_O) Makefile cfile_tools.h util.h
  18. ar r libbgpdump.a $(LIB_O)
  19. $(RANLIB) libbgpdump.a
  20. libbgpdump.so: libbgpdump.a
  21. $(COMPILE) $(LDFLAGS) -o libbgpdump.so $(LIB_O) $(SYS_LIBS)
  22. example: example.c libbgpdump.a
  23. $(COMPILE) -o example example.c libbgpdump.a $(SYS_LIBS)
  24. bgpdump: bgpdump.c libbgpdump.a
  25. $(COMPILE) -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)
  26. check-clean:
  27. rm -f test_out/*.bgp.gz
  28. check: check-clean bgpdump
  29. ./test.sh
  30. clean: check-clean
  31. rm -f libbgpdump.so libbgpdump.a example bgpdump $(LIB_O)
  32. distclean: clean
  33. rm -Rf config.log config.status *.dSYM core *.core autom4te.cache bgpdump-config.h Makefile
  34. rm -Rf $(PKG)
  35. install: all
  36. install -d $(bindir) $(includedir) $(libdir)
  37. install bgpdump $(bindir)
  38. install $(LIB_H) $(includedir)
  39. install libbgpdump.so libbgpdump.a $(libdir)
  40. PKG=@PACKAGE_NAME@-@PACKAGE_VERSION@
  41. dist:
  42. mkdir $(PKG)
  43. ln *.h *.c $(OTHER) $(PKG)
  44. tar -czf $(PKG).tgz $(PKG)
  45. rm $(PKG)/* && rmdir $(PKG)
  46. rpm: dist
  47. rpmbuild -v -ta $(PKG).tgz