Makefile.in 1.6 KB

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