security/nss/lib/freebl/config.mk

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 # This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 4
michael@0 5 # only do this in the outermost freebl build.
michael@0 6 ifndef FREEBL_CHILD_BUILD
michael@0 7
michael@0 8 # We're going to change this build so that it builds libfreebl.a with
michael@0 9 # just loader.c. Then we have to build this directory twice again to
michael@0 10 # build the two DSOs.
michael@0 11 # To build libfreebl.a with just loader.c, we must now override many
michael@0 12 # of the make variables setup by the prior inclusion of CORECONF's config.mk
michael@0 13
michael@0 14 CSRCS = loader.c
michael@0 15 SIMPLE_OBJS = $(CSRCS:.c=$(OBJ_SUFFIX))
michael@0 16 OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(SIMPLE_OBJS))
michael@0 17 ALL_TRASH := $(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \
michael@0 18 $(NOSUCHFILE) so_locations
michael@0 19
michael@0 20 # this is not a recursive child make. We make a static lib. (archive)
michael@0 21
michael@0 22 # Override the values defined in coreconf's ruleset.mk.
michael@0 23 #
michael@0 24 # - (1) LIBRARY: a static (archival) library
michael@0 25 # - (2) SHARED_LIBRARY: a shared (dynamic link) library
michael@0 26 # - (3) IMPORT_LIBRARY: an import library, used only on Windows
michael@0 27 # - (4) PROGRAM: an executable binary
michael@0 28 #
michael@0 29 # override these variables to prevent building a DSO/DLL.
michael@0 30 TARGETS = $(LIBRARY)
michael@0 31 SHARED_LIBRARY =
michael@0 32 IMPORT_LIBRARY =
michael@0 33 PROGRAM =
michael@0 34
michael@0 35 else
michael@0 36
michael@0 37 # This is a recursive child make. We build the shared lib.
michael@0 38
michael@0 39 TARGETS = $(SHARED_LIBRARY)
michael@0 40 LIBRARY =
michael@0 41 IMPORT_LIBRARY =
michael@0 42 PROGRAM =
michael@0 43
michael@0 44 ifeq ($(OS_TARGET), SunOS)
michael@0 45 OS_LIBS += -lkstat
michael@0 46 endif
michael@0 47
michael@0 48 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
michael@0 49
michael@0 50 # don't want the 32 in the shared library name
michael@0 51 SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
michael@0 52
michael@0 53 RES = $(OBJDIR)/$(LIBRARY_NAME).res
michael@0 54 RESNAME = freebl.rc
michael@0 55
michael@0 56 ifdef NS_USE_GCC
michael@0 57 OS_LIBS += -ladvapi32
michael@0 58 else
michael@0 59 OS_LIBS += advapi32.lib
michael@0 60 endif
michael@0 61
michael@0 62 ifdef NS_USE_GCC
michael@0 63 EXTRA_SHARED_LIBS += \
michael@0 64 -L$(DIST)/lib \
michael@0 65 -L$(NSSUTIL_LIB_DIR) \
michael@0 66 -lnssutil3 \
michael@0 67 -L$(NSPR_LIB_DIR) \
michael@0 68 -lnspr4 \
michael@0 69 $(NULL)
michael@0 70 else # ! NS_USE_GCC
michael@0 71 EXTRA_SHARED_LIBS += \
michael@0 72 $(DIST)/lib/nssutil3.lib \
michael@0 73 $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.lib \
michael@0 74 $(NULL)
michael@0 75 endif # NS_USE_GCC
michael@0 76
michael@0 77 else
michael@0 78
michael@0 79 ifeq ($(FREEBL_NO_DEPEND),1)
michael@0 80 #drop pthreads as well
michael@0 81 OS_PTHREAD=
michael@0 82 else
michael@0 83 EXTRA_SHARED_LIBS += \
michael@0 84 -L$(DIST)/lib \
michael@0 85 -L$(NSSUTIL_LIB_DIR) \
michael@0 86 -lnssutil3 \
michael@0 87 -L$(NSPR_LIB_DIR) \
michael@0 88 -lnspr4 \
michael@0 89 $(NULL)
michael@0 90 endif
michael@0 91 endif
michael@0 92
michael@0 93 ifeq ($(OS_ARCH), Darwin)
michael@0 94 EXTRA_SHARED_LIBS += -dylib_file @executable_path/libplc4.dylib:$(DIST)/lib/libplc4.dylib -dylib_file @executable_path/libplds4.dylib:$(DIST)/lib/libplds4.dylib
michael@0 95 endif
michael@0 96
michael@0 97 endif

mercurial