Makefile.am 2.3 KB

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