Makefile.in-4 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. prefix=@prefix@
  2. exec_prefix=@exec_prefix@
  3. libdir=@libdir@
  4. includedir=@includedir@
  5. top_srcdir=@top_srcdir@
  6. top_builddir=@top_builddir@
  7. CC = @CC@
  8. CXX = @CXX@
  9. LIBTOOL = @LIBTOOL@
  10. CFLAGS = @CFLAGS@
  11. CXXFLAGS = @CXXFLAGS@
  12. LDFLAGS = @LDFLAGS@
  13. LTCC = $(LIBTOOL) --mode=compile --tag=CC $(CC)
  14. LTCXX = $(LIBTOOL) --mode=compile --tag=CXX $(CXX)
  15. LTLD = $(LIBTOOL) --mode=link --tag=CXX $(CXX)
  16. NS_S_PR_CFLAGS = $(shell pkg-config --cflags nss nspr)
  17. NS_S_PR_LIBS = $(shell pkg-config --libs nss nspr)
  18. SRCS = $(shell find "$(top_srcdir)" -name examples -prune -o -type f '(' -name '*.cpp' -o -name '*.c' -not -name '*Test*' ')')
  19. LTOBJS = $(subst .c,.lo,$(subst .cpp,.lo,$(SRCS)))
  20. HDRS = $(top_srcdir)/cshim/mq/xa.h $(shell find "$(top_srcdir)"/cshim -type f -name 'mq*.h')
  21. INSTHDRS = $(subst $(top_srcdir)/cshim,$(DESTDIR)$(includedir),$(HDRS))
  22. LTLIBRARY = libmqcrt.la
  23. INSTLTLIBRARY = $(DESTDIR)$(libdir)/$(LTLIBRARY)
  24. .SUFFIXES:
  25. .SUFFIXES: .cpp .c .lo
  26. default: all
  27. all: $(LTLIBRARY)
  28. Makefile: Makefile.in
  29. $(top_builddir)/config.status $@
  30. .cpp.lo:
  31. $(LTCXX) -o $@ $(NS_S_PR_CFLAGS) $(CXXFLAGS) -c $<
  32. .c.lo:
  33. $(LTCC) -o $@ $(NS_S_PR_CFLAGS) $(CFLAGS) -c $<
  34. VERSIONNUMBER = $(shell { echo '#include "cshim/mqversion.h"'; echo '-version-number MQ_VMAJOR:MQ_VMINOR:MQ_VMICRO'; } | ${CC} -E - | grep version-number)
  35. $(LTLIBRARY): $(LTOBJS)
  36. version=` \
  37. { echo '#include "cshim/mqversion.h"' \
  38. ; echo '-version-number MQ_VMAJOR:MQ_VMINOR:MQ_VMICRO' \
  39. ; } \
  40. | ${CC} -E - \
  41. | grep version-number \
  42. ` \
  43. && $(LTLD) -o $@ --no-undefined $${version} $(CXXFLAGS) $(NS_S_PR_LIBS) $(LDFLAGS) -rpath $(libdir) $?
  44. $(INSTLTLIBRARY): $(LTLIBRARY)
  45. $(top_srcdir)/install-sh -d "$(dir $@)"
  46. $(LIBTOOL) --mode=install cp $(LTLIBRARY) $@
  47. $(DESTDIR)$(includedir)/%: $(top_srcdir)/cshim/%
  48. $(top_srcdir)/install-sh -d "$(dir $@)"
  49. cp -f "$<" "$@"
  50. install: $(INSTLTLIBRARY) $(INSTHDRS)