config.mk 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. #
  6. # Override TARGETS variable so that only static libraries
  7. # are specifed as dependencies within rules.mk.
  8. #
  9. # can't do this in manifest.mn because OS_TARGET isn't defined there.
  10. ifeq (,$(filter-out WIN%,$(OS_TARGET)))
  11. # don't want the 32 in the shared library name
  12. SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
  13. IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
  14. RES = $(OBJDIR)/$(LIBRARY_NAME).res
  15. RESNAME = $(LIBRARY_NAME).rc
  16. ifdef NS_USE_GCC
  17. EXTRA_SHARED_LIBS += \
  18. -L$(DIST)/lib \
  19. -L$(NSSUTIL_LIB_DIR) \
  20. -lnssutil3 \
  21. -L$(NSPR_LIB_DIR) \
  22. -lplc4 \
  23. -lplds4 \
  24. -lnspr4\
  25. $(NULL)
  26. else # ! NS_USE_GCC
  27. EXTRA_SHARED_LIBS += \
  28. $(DIST)/lib/nssutil3.lib \
  29. $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.lib \
  30. $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.lib \
  31. $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
  32. $(NULL)
  33. endif # NS_USE_GCC
  34. else
  35. # $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
  36. # $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
  37. EXTRA_SHARED_LIBS += \
  38. -L$(DIST)/lib \
  39. -L$(NSSUTIL_LIB_DIR) \
  40. -lnssutil3 \
  41. -L$(NSPR_LIB_DIR) \
  42. -lplc4 \
  43. -lplds4 \
  44. -lnspr4 \
  45. $(NULL)
  46. endif
  47. # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
  48. ifeq ($(OS_TARGET),SunOS)
  49. ifeq ($(BUILD_SUN_PKG), 1)
  50. # The -R '$ORIGIN' linker option instructs this library to search for its
  51. # dependencies in the same directory where it resides.
  52. ifeq ($(USE_64), 1)
  53. MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1/64:/usr/lib/mps/64'
  54. else
  55. MKSHLIB += -R '$$ORIGIN:/usr/lib/mps/secv1:/usr/lib/mps'
  56. endif
  57. else
  58. MKSHLIB += -R '$$ORIGIN'
  59. endif
  60. endif
  61. ifeq ($(OS_ARCH), HP-UX)
  62. ifneq ($(OS_TEST), ia64)
  63. # pa-risc
  64. ifeq ($(USE_64), 1)
  65. MKSHLIB += +b '$$ORIGIN'
  66. endif
  67. endif
  68. endif