Makefile.am 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ## Process this file with automake to produce Makefile.in.
  2. AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_builddir)/lib
  3. AM_CFLAGS = $(WERROR)
  4. DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\"
  5. lib_LTLIBRARIES = libzebra.la
  6. libzebra_la_LDFLAGS = -version-info 0:0:0
  7. libzebra_la_SOURCES = \
  8. network.c pid_output.c getopt.c getopt1.c daemon.c \
  9. checksum.c vector.c linklist.c vty.c command.c \
  10. sockunion.c prefix.c thread.c if.c memory.c buffer.c table.c hash.c \
  11. filter.c routemap.c distribute.c stream.c str.c log.c plist.c \
  12. zclient.c sockopt.c smux.c agentx.c snmp.c md5.c if_rmap.c keychain.c privs.c \
  13. sigevent.c pqueue.c jhash.c memtypes.c workqueue.c vrf.c \
  14. event_counter.c nexthop.c
  15. BUILT_SOURCES = memtypes.h route_types.h gitversion.h
  16. libzebra_la_DEPENDENCIES = @LIB_REGEX@
  17. libzebra_la_LIBADD = @LIB_REGEX@ @LIBCAP@
  18. pkginclude_HEADERS = \
  19. buffer.h checksum.h command.h filter.h getopt.h hash.h \
  20. if.h linklist.h log.h \
  21. memory.h network.h prefix.h routemap.h distribute.h sockunion.h \
  22. str.h stream.h table.h thread.h vector.h version.h vty.h zebra.h \
  23. plist.h zclient.h sockopt.h smux.h md5.h if_rmap.h keychain.h \
  24. privs.h sigevent.h pqueue.h jhash.h zassert.h memtypes.h \
  25. workqueue.h route_types.h libospf.h vrf.h fifo.h event_counter.h \
  26. nexthop.h
  27. noinst_HEADERS = \
  28. plist_int.h
  29. EXTRA_DIST = \
  30. regex.c regex-gnu.h \
  31. queue.h \
  32. memtypes.awk \
  33. route_types.pl route_types.txt \
  34. gitversion.pl
  35. memtypes.h: $(srcdir)/memtypes.c $(srcdir)/memtypes.awk
  36. ($(GAWK) -f $(srcdir)/memtypes.awk $(srcdir)/memtypes.c > $@)
  37. route_types.h: $(srcdir)/route_types.txt $(srcdir)/route_types.pl
  38. @PERL@ $(srcdir)/route_types.pl < $(srcdir)/route_types.txt > $@
  39. if GIT_VERSION
  40. # bit of a trick here to always have up-to-date git stamps without triggering
  41. # unneccessary rebuilds. .PHONY causes the .tmp file to be rebuilt always,
  42. # but if we use that on gitversion.h it'll ripple through the .c file deps.
  43. # (even if gitversion.h's file timestamp doesn't change, make will think it
  44. # did, because of .PHONY...)
  45. .PHONY: gitversion.h.tmp
  46. .SILENT: gitversion.h gitversion.h.tmp
  47. GITH=gitversion.h
  48. gitversion.h.tmp: $(srcdir)/../.git
  49. @PERL@ $(srcdir)/gitversion.pl $(srcdir) > ${GITH}.tmp
  50. gitversion.h: gitversion.h.tmp
  51. { test -f ${GITH} && diff -s -q ${GITH}.tmp ${GITH}; } || cp -v ${GITH}.tmp ${GITH}
  52. else
  53. .PHONY: gitversion.h
  54. gitversion.h:
  55. true
  56. endif