Makefile.am 2.2 KB

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