Makefile.in 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. #
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. #! gmake
  6. MOD_DEPTH = ../..
  7. topsrcdir = @top_srcdir@
  8. srcdir = @srcdir@
  9. VPATH = @srcdir@
  10. include $(MOD_DEPTH)/config/autoconf.mk
  11. include $(topsrcdir)/config/config.mk
  12. ifeq ($(OS_ARCH), BeOS)
  13. CFLAGS += -frtti -fexceptions
  14. endif
  15. INCLUDES = -I$(dist_includedir)
  16. HEADERS = $(wildcard $(srcdir)/*.h)
  17. CSRCS = \
  18. plvrsion.c \
  19. $(NULL)
  20. CXXSRCS = \
  21. prstrms.cpp \
  22. $(NULL)
  23. OBJS = $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX)) $(CXXSRCS:.cpp=.$(OBJ_SUFFIX)))
  24. ifeq ($(OS_ARCH), WINNT)
  25. RES=$(OBJDIR)/prstrms.res
  26. RESNAME=prstrms.rc
  27. OS_LIBS = user32.lib
  28. else
  29. ifeq ($(OS_ARCH),OS2)
  30. OS_LIBS = -lstdcpp
  31. else
  32. ifeq ($(OS_ARCH), AIX)
  33. ifeq ($(OS_RELEASE), 4.1)
  34. ifeq ($(CLASSIC_NSPR),1)
  35. OS_LIBS += -lC -lc
  36. else
  37. OS_LIBS += -lC_r -lc_r
  38. endif
  39. else
  40. # makeC++SharedLib(_r) is in either /usr/lpp/xlC/bin
  41. # or /usr/ibmcxx/bin.
  42. ifeq ($(CLASSIC_NSPR),1)
  43. MKSHLIB = makeC++SharedLib -p 0
  44. else
  45. MKSHLIB = makeC++SharedLib_r -p 0
  46. endif
  47. OS_LIBS += -ldl
  48. endif
  49. endif
  50. endif
  51. endif
  52. ifeq ($(OS_ARCH),BeOS)
  53. OS_LIBS = -lstdc++.r4
  54. endif
  55. ifeq ($(OS_ARCH), UNIXWARE)
  56. OS_LIBS += -lC
  57. endif
  58. EXTRA_LIBS = $(LIBNSPR)
  59. # On SCOOS, we can't link with extra libraries when
  60. # we build a shared library. If we do so, the linker doesn't
  61. # complain, but we would run into weird problems at run-time.
  62. # Therefore on these platforms, we link just the object files.
  63. ifeq ($(OS_ARCH),SCOOS)
  64. EXTRA_LIBS =
  65. endif
  66. ifdef RESOLVE_LINK_SYMBOLS
  67. EXTRA_LIBS += $(OS_LIBS)
  68. endif
  69. LIBRARY_NAME = prstrms
  70. LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
  71. RELEASE_HEADERS = $(HEADERS)
  72. RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
  73. RELEASE_LIBS = $(TARGETS)
  74. include $(topsrcdir)/config/rules.mk
  75. #
  76. # Version information generation (begin)
  77. #
  78. ECHO = echo
  79. TINC = $(OBJDIR)/_pl_bld.h
  80. PROD = $(notdir $(SHARED_LIBRARY))
  81. NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
  82. SH_DATE = $(shell date "+%Y-%m-%d %T")
  83. SH_NOW = $(shell $(NOW))
  84. ifeq ($(OS_ARCH), WINNT)
  85. SUF = i64
  86. else
  87. SUF = LL
  88. endif
  89. $(TINC):
  90. @$(MAKE_OBJDIR)
  91. @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
  92. @if test ! -z "$(SH_NOW)"; then \
  93. $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
  94. else \
  95. true; \
  96. fi
  97. @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
  98. $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
  99. ifeq ($(OS_ARCH), WINNT)
  100. $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
  101. else
  102. $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
  103. endif
  104. #
  105. # Version information generation (end)
  106. #
  107. export:: $(TARGETS) $(HEADERS)
  108. $(INSTALL) -m 444 $(HEADERS) $(dist_includedir)
  109. $(INSTALL) -m 444 $(TARGETS) $(dist_libdir)
  110. ifeq ($(OS_ARCH),OS2)
  111. $(INSTALL) -m 444 $(TARGETS) $(dist_bindir)
  112. endif
  113. ifeq ($(OS_ARCH),HP-UX)
  114. ifdef SHARED_LIBRARY
  115. $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir)
  116. endif
  117. endif