common.am 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #
  2. # Automake fragment intended to be shared by Makefile.am files in the
  3. # tree.
  4. #
  5. if HAVE_PROTOBUF
  6. # Uncomment to use an non-system version of libprotobuf-c.
  7. #
  8. # Q_PROTOBUF_C_CLIENT_INCLUDES = -I$(top_srcdir)/third-party/protobuf-c/src
  9. # Q_PROTOBUF_C_CLIENT_LDOPTS = $(top_builddir)/third-party/protobuf-c/src/libprotobuf-c.la
  10. Q_PROTOBUF_C_CLIENT_INCLUDES=
  11. Q_PROTOBUF_C_CLIENT_LDOPTS=-lprotobuf-c
  12. Q_PROTOC=protoc
  13. Q_PROTOC_C=protoc-c
  14. Q_PROTOBUF_CFILES = $(filter %.pb-c.c,$(SOURCES))
  15. Q_PROTOBUF_SRCS = $(Q_PROTOBUF_CFILES) $(Q_PROTOBUF_HFILES)
  16. # Rules
  17. %.pb.h: %.proto
  18. $(Q_PROTOC) $(PROTOBUF_INCLUDES) --cpp_out=$(top_srcdir) $(top_srcdir)/$(PROTOBUF_PACKAGE)/$^
  19. %.pb-c.c %.pb-c.h: %.proto
  20. $(Q_PROTOC_C) $(PROTOBUF_INCLUDES) --c_out=$(top_srcdir) $(top_srcdir)/$(PROTOBUF_PACKAGE)/$^
  21. #
  22. # Information about how to link to various libraries.
  23. #
  24. Q_QUAGGA_PB_CLIENT_LDOPTS = $(top_srcdir)/qpb/libquagga_pb.la $(Q_PROTOBUF_C_CLIENT_LDOPTS)
  25. Q_FPM_PB_CLIENT_LDOPTS = $(top_srcdir)/fpm/libfpm_pb.la $(Q_QUAGGA_PB_CLIENT_LDOPTS)
  26. endif # HAVE_PROTOBUF
  27. Q_CLEANFILES = $(Q_PROTOBUF_SRCS)
  28. Q_BUILT_SRCS = $(Q_PROTOBUF_SRCS)