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 22 23 24PRJ=. 25 26PRJNAME=nss 27TARGET=nss 28 29# --- Settings ----------------------------------------------------- 30 31.INCLUDE : settings.mk 32 33# --- Files -------------------------------------------------------- 34 35.IF "$(ENABLE_NSS_MODULE)"!="YES" 36 37all: 38 @echo "NSS will not be built. ENABLE_NSS_MODULE is '$(ENABLE_NSS_MODULE)'" 39 40.ELSE 41 42TARFILE_NAME=nss-3.12.6-with-nspr-4.8.4 43TARFILE_MD5=b92261a5679276c400555004937af965 44TARFILE_ROOTDIR=nss-3.12.6 45PATCH_FILES=nss.patch 46 47.IF "$(OS)"=="MACOSX" 48MACOS_SDK_DIR=/Developer/SDKs/MacOSX10.4u.sdk 49.EXPORT : MACOS_SDK_DIR 50PATCH_FILES+=nss_macosx.patch 51.ENDIF # "$(OS)"=="MACOSX" 52 53.IF "$(debug)" != "" 54.ELSE 55BUILD_OPT=1 56.EXPORT: BUILD_OPT 57.ENDIF 58 59.IF "$(GUI)"=="UNX" 60.IF "$(OS)$(COM)"=="LINUXGCC" 61.IF "$(BUILD64)"=="1" 62# force 64-bit buildmode 63USE_64:=1 64.EXPORT : USE_64 65.ENDIF # "$(CPU)"=="X" 66.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 67 68.IF "$(OS)$(COM)"=="FREEBSDGCC" 69.IF "$(CPU)"=="X" 70# force 64-bit buildmode 71USE_64:=1 72.EXPORT : USE_64 73.ENDIF # "$(CPU)"=="X" 74.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 75 76.IF "$(OS)"=="MACOSX" 77.IF "$(EXTRA_CFLAGS)"!="" 78CPP:=gcc -E $(EXTRA_CFLAGS) 79CXX:=g++ $(EXTRA_CFLAGS) 80CC:=gcc $(EXTRA_CFLAGS) 81.EXPORT : CPP 82.ENDIF # "$(EXTRA_CFLAGS)"!="" 83.ENDIF # "$(OS)"=="MACOSX" 84 85OUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST) 86 87BUILD_DIR=mozilla$/security$/nss 88BUILD_ACTION= $(GNUMAKE) nss_build_all 89#See #i105566# && moz#513024# 90.IF "$(OS)"=="LINUX" 91BUILD_ACTION+=FREEBL_NO_DEPEND=1 92PATCH_FILES+=nss_linux.patch 93.ENDIF 94 95.ENDIF # "$(GUI)"=="UNX" 96 97 98.IF "$(GUI)"=="WNT" 99 100.IF "$(COM)"=="GCC" 101 102PATCH_FILES+=nss.patch.mingw 103 104moz_build:=$(shell cygpath -p $(MOZILLABUILD)) 105PATH!:=$(moz_build)/bin:$(PATH) 106 107nss_CC=$(CC) 108nss_CXX=$(CXX) 109.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 110nss_CC+=-shared-libgcc 111nss_CXX+=-shared-libgcc 112.ENDIF 113 114nss_LIBS= 115.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 116nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 117.ENDIF 118 119 120BUILD_DIR=mozilla$/security$/nss 121BUILD_ACTION=NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" OS_TARGET=WIN95 _WIN32_IE=0x500 PATH="$(PATH)" DEFINES=-D_WIN32_IE=0x500 $(GNUMAKE) nss_build_all 122 123OUT2LIB= \ 124 mozilla$/dist$/out$/lib$/libnspr4.a \ 125 mozilla$/dist$/out$/lib$/libnss3.a \ 126 mozilla$/dist$/out$/lib$/libnssdbm3.a \ 127 mozilla$/dist$/out$/lib$/libnssutil3.a \ 128 mozilla$/dist$/out$/lib$/libplc4.a \ 129 mozilla$/dist$/out$/lib$/libplds4.a \ 130 mozilla$/dist$/out$/lib$/libsmime3.a \ 131 mozilla$/dist$/out$/lib$/libsoftokn3.a \ 132 mozilla$/dist$/out$/lib$/libsqlite3.a \ 133 mozilla$/dist$/out$/lib$/libssl3.a 134 135.ELSE # "$(COM)"=="GCC" 136MOZ_MSVCVERSION= 9 137.EXPORT : MOZ_MSVCVERSION 138moz_build:=$(shell cygpath -p $(MOZILLABUILD)) 139 140#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll 141#become libnspr4.dll, libplc4.dll, libplds4.dll 142#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000). 143#OS_TARGET= WINNT 144OS_TARGET=WIN95 145.EXPORT : OS_TARGET 146 147# make use of stlport headerfiles 148EXT_USE_STLPORT=TRUE 149 150#To build nss one has to call "make nss_build_all" in 151#mozilla/security/nss 152NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/mozilla/security/nss) 153BUILD_ACTION= PATH="$(moz_build)/msys/bin:$(moz_build)/moztools/bin:$(PATH)" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \ 154 -c "cd $(NSS_BUILD_DIR) && make nss_build_all" 155 156OUT2LIB= \ 157 mozilla$/dist$/out$/lib$/nspr4.lib \ 158 mozilla$/dist$/out$/lib$/nss3.lib \ 159 mozilla$/dist$/out$/lib$/nssdbm3.lib \ 160 mozilla$/dist$/out$/lib$/nssutil3.lib \ 161 mozilla$/dist$/out$/lib$/plc4.lib \ 162 mozilla$/dist$/out$/lib$/plds4.lib \ 163 mozilla$/dist$/out$/lib$/smime3.lib \ 164 mozilla$/dist$/out$/lib$/softokn3.lib \ 165 mozilla$/dist$/out$/lib$/sqlite3.lib \ 166 mozilla$/dist$/out$/lib$/ssl3.lib 167 168.ENDIF # "$(COM)"=="GCC" 169 170OUT2BIN=mozilla$/dist$/out$/lib$/*$(DLLPOST) 171.ENDIF # "$(GUI)"=="WNT" 172 173 174OUTDIR2INC=mozilla$/dist$/public$/nss mozilla$/dist$/out$/include 175 176# --- Targets ------------------------------------------------------ 177 178.INCLUDE : set_ext.mk 179.INCLUDE : target.mk 180.INCLUDE : tg_ext.mk 181 182.ENDIF 183