1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22PRJ=. 23 24PRJNAME=nss 25TARGET=nss 26 27# --- Settings ----------------------------------------------------- 28 29.INCLUDE : settings.mk 30 31# --- Files -------------------------------------------------------- 32 33.IF "$(ENABLE_NSS_MODULE)"!="YES" || "$(SYSTEM_NSS)"=="YES" 34 35all: 36 @echo "NSS will not be built because ENABLE_NSS_MODULE='$(ENABLE_NSS_MODULE)' and SYSTEM_NSS='$(SYSTEM_NSS)'" 37 38.ELSE 39 40TARFILE_NAME=nss-3.39-with-nspr-4.20 41TARFILE_MD5=8ac77166663de5c33bba6cb3d0066929 42TARFILE_ROOTDIR=nss-3.39 43PATCH_FILES=nss.patch 44PATCH_FILES+=nss_sizes.patch 45 46.IF "$(OS)"=="MACOSX" 47MACOS_SDK_DIR=$(SDK_PATH) 48.EXPORT : MACOS_SDK_DIR 49PATCH_FILES+=nss_macosx.patch 50.ENDIF # "$(OS)"=="MACOSX" 51 52.IF "$(debug)" != "" 53.ELSE 54BUILD_OPT=1 55.EXPORT: BUILD_OPT 56.ENDIF 57 58.IF "$(BUILD64)"=="1" 59# force the 64-bit build mode for 64bit targets 60USE_64:=1 61.EXPORT : USE_64 62.ENDIF # "$(BUILD64)"=="1" 63 64OUT2LIB=dist$/*.OBJ$/lib$/*$(DLLPOST) 65 66BUILD_DIR=nss 67BUILD_ACTION= $(GNUMAKE) nss_build_all 68# See #i105566# && moz#513024# 69.IF "$(OS)"=="LINUX" 70BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1 NSS_ENABLE_WERROR=0 71PATCH_FILES+=nss_linux.patch 72.ENDIF 73 74.IF "$(OS)"=="FREEBSD" 75BUILD_ACTION+=NSS_DISABLE_GTESTS=1 76.ENDIF 77 78.IF "$(OS)"=="MACOSX" 79# clang 13+ warns on unused-but-set variables, fatal under NSS's default -Werror 80BUILD_ACTION+=NSS_DISABLE_GTESTS=1 NSS_ENABLE_WERROR=0 81.ENDIF 82 83 84.IF "$(GUI)"=="WNT" 85 86.IF "$(COM)"=="GCC" 87 88PATCH_FILES+=nss.patch.mingw 89 90moz_build:=$(shell cygpath -p $(MOZILLABUILD)) 91PATH!:=$(moz_build)/bin:$(PATH) 92 93nss_CC=$(CC) 94nss_CXX=$(CXX) 95.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 96nss_CC+=-shared-libgcc 97nss_CXX+=-shared-libgcc 98.ENDIF 99 100nss_LIBS= 101.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 102nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 103.ENDIF 104 105 106BUILD_DIR=nss 107BUILD_ACTION= NSS_DISABLE_GTESTS=1 NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" OS_TARGET=WINNT _WIN32_IE=0x500 PATH="$(PATH)" DEFINES=-D_WIN32_IE=0x500 $(GNUMAKE) nss_build_all 108 109OUT2LIB= \ 110 dist$/*.OBJ$/lib$/libnspr4.a \ 111 dist$/*.OBJ$/lib$/libnss3.a \ 112 dist$/*.OBJ$/lib$/libnssdbm3.a \ 113 dist$/*.OBJ$/lib$/libnssutil3.a \ 114 dist$/*.OBJ$/lib$/libplc4.a \ 115 dist$/*.OBJ$/lib$/libplds4.a \ 116 dist$/*.OBJ$/lib$/libsmime3.a \ 117 dist$/*.OBJ$/lib$/libsoftokn3.a \ 118 dist$/*.OBJ$/lib$/libsqlite3.a \ 119 dist$/*.OBJ$/lib$/libssl3.a 120 121.ELSE # "$(COM)"=="GCC" 122MOZ_MSVCVERSION= 9 123.EXPORT : MOZ_MSVCVERSION 124PATCH_FILES+=nss_win.patch 125moz_build:=$(shell cygpath -p $(MOZILLABUILD)) 126 127# Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll 128# become libnspr4.dll, libplc4.dll, libplds4.dll 129# WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000). 130OS_TARGET=WINNT 131#OS_TARGET=WIN95 132.EXPORT : OS_TARGET 133 134# make use of stlport headerfiles 135EXT_USE_STLPORT=TRUE 136 137# To build nss one has to call "make nss_build_all" in nss 138NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/nss) 139BUILD_ACTION= PATH="$(PATH):$(moz_build)/msys/bin:$(moz_build)/bin:$(moz_build)/msys/local/bin:$(moz_build)/moztools/bin" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \ 140 -c "cd $(NSS_BUILD_DIR) && make nss_build_all NSS_DISABLE_GTESTS=1" 141 142OUT2LIB= \ 143 dist$/*.OBJ$/lib$/libnspr4.lib \ 144 dist$/*.OBJ$/lib$/nss3.lib \ 145 dist$/*.OBJ$/lib$/nssdbm3.lib \ 146 dist$/*.OBJ$/lib$/nssutil3.lib \ 147 dist$/*.OBJ$/lib$/libplc4.lib \ 148 dist$/*.OBJ$/lib$/libplds4.lib \ 149 dist$/*.OBJ$/lib$/smime3.lib \ 150 dist$/*.OBJ$/lib$/softokn3.lib \ 151 dist$/*.OBJ$/lib$/sqlite3.lib \ 152 dist$/*.OBJ$/lib$/ssl3.lib 153 154.ENDIF # "$(COM)"=="GCC" 155 156OUT2BIN=dist$/*.OBJ$/lib$/*$(DLLPOST) 157.ENDIF # "$(GUI)"=="WNT" 158 159 160OUTDIR2INC=dist$/public$/nss dist$/*.OBJ$/include 161 162# --- Targets ------------------------------------------------------ 163 164.INCLUDE : set_ext.mk 165.INCLUDE : target.mk 166.INCLUDE : tg_ext.mk 167 168.ENDIF 169 170# vim: set noet sw=4 ts=4: 171