diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/Makefile | 8 | ||||
-rw-r--r-- | cmd/manifest.mn | 4 | ||||
-rw-r--r-- | cmd/platlibs.mk | 31 |
3 files changed, 38 insertions, 5 deletions
diff --git a/cmd/Makefile b/cmd/Makefile index b98205926..0ae45649c 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -14,6 +14,14 @@ ifdef BUILD_LIBPKIX_TESTS DIRS += libpkix endif +ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1) +BLTEST_SRCDIR= +FIPSTEST_SRCDIR= +else +BLTEST_SRCDIR = bltest +FIPSTEST_SRCDIR = fipstest +endif + LOWHASHTEST_SRCDIR= ifeq ($(FREEBL_LOWHASH),1) LOWHASHTEST_SRCDIR = lowhashtest # Add the lowhashtest directory to DIRS. diff --git a/cmd/manifest.mn b/cmd/manifest.mn index f66abc306..4ebe00478 100644 --- a/cmd/manifest.mn +++ b/cmd/manifest.mn @@ -11,7 +11,7 @@ REQUIRES = nss nspr libdbm DIRS = lib \ addbuiltin \ atob \ - bltest \ + $(BLTEST_SRCDIR) \ btoa \ certcgi \ certutil \ @@ -23,7 +23,7 @@ DIRS = lib \ derdump \ digest \ httpserv \ - fipstest \ + $(FIPSTEST_SRCDIR) \ $(LOWHASHTEST_SRCDIR) \ listsuites \ makepqg \ diff --git a/cmd/platlibs.mk b/cmd/platlibs.mk index 332681dd4..200faf701 100644 --- a/cmd/platlibs.mk +++ b/cmd/platlibs.mk @@ -36,7 +36,18 @@ ifdef USE_STATIC_LIBS DEFINES += -DNSS_USE_STATIC_LIBS # $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS) -CRYPTOLIB=$(SOFTOKEN_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) +ifndef USE_SYSTEM_FREEBL +CRYPTOLIB=$(DIST)/lib/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) +SOFTOKENLIB=$(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) +else +# Use the system freebl and softoken libraries +CRYPTOLIB=$(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) +SOFTOKENLIB= +EXTRA_SHARED_LIBS += \ + -L$(SOFTOKEN_LIB_DIR) \ + -lsoftokn3 \ + $(NULL) +endif PKIXLIB = \ $(DIST)/lib/$(LIB_PREFIX)pkixtop.$(LIB_SUFFIX) \ @@ -67,7 +78,7 @@ EXTRA_LIBS += \ $(DIST)/lib/$(LIB_PREFIX)cryptohi.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \ + $(SOFTOKENLIB) \ $(CRYPTOLIB) \ $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \ @@ -102,7 +113,7 @@ EXTRA_LIBS += \ $(DIST)/lib/$(LIB_PREFIX)certhi.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)pk11wrap.$(LIB_SUFFIX) \ - $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \ + $(SOFTOKENLIB) \ $(DIST)/lib/$(LIB_PREFIX)certdb.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)nsspki.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)nssdev.$(LIB_SUFFIX) \ @@ -185,8 +196,22 @@ EXTRA_SHARED_LIBS += \ $(NULL) endif +ifdef SOFTOKEN_LIB_DIR +ifdef NSS_USE_SYSTEM_FREEBL +EXTRA_SHARED_LIBS += -L$(SOFTOKEN_LIB_DIR) -lsoftokn3 +endif +endif + endif # USE_STATIC_LIBS +# If a platform has a system freebl, set USE_SYSTEM_FREEBL to 1 and +# FREEBL_LIBS to the linker command-line arguments for the system nss-util +# (for example, -lfreebl3 on fedora) in the platform's config file in coreconf. +ifdef NSS_USE_SYSTEM_FREEBL +FREEBL_LIBS = $(FREEBL_LIB_DIR)/$(LIB_PREFIX)freebl.$(LIB_SUFFIX) +EXTRA_LIBS += $(FREEBL_LIBS) +endif + # If a platform has a system zlib, set USE_SYSTEM_ZLIB to 1 and # ZLIB_LIBS to the linker command-line arguments for the system zlib # (for example, -lz) in the platform's config file in coreconf. |