1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 11# OpenOffice.org is free software: you can redistribute it and/or modify 12# it under the terms of the GNU Lesser General Public License version 3 13# only, as published by the Free Software Foundation. 14# 15# OpenOffice.org is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY; without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18# GNU Lesser General Public License version 3 for more details 19# (a copy is included in the LICENSE file that accompanied this code). 20# 21# You should have received a copy of the GNU Lesser General Public License 22# version 3 along with OpenOffice.org. If not, see 23# <http://www.openoffice.org/license.html> 24# for a copy of the LGPLv3 License. 25# 26#************************************************************************* 27 28PRJ=. 29 30PRJNAME=nss 31TARGET=nss 32 33# --- Settings ----------------------------------------------------- 34 35.INCLUDE : settings.mk 36 37# --- Files -------------------------------------------------------- 38 39.IF "$(ENABLE_NSS_MODULE)"!="YES" 40 41all: 42 @echo "NSS will not be built. ENABLE_NSS_MODULE is '$(ENABLE_NSS_MODULE)'" 43 44.ELSE 45 46TARFILE_NAME=nss-3.12.6-with-nspr-4.8.4 47TARFILE_MD5=b92261a5679276c400555004937af965 48TARFILE_ROOTDIR=nss-3.12.6 49PATCH_FILES=nss.patch 50 51.IF "$(OS)"=="MACOSX" 52MACOS_SDK_DIR=/Developer/SDKs/MacOSX10.4u.sdk 53.EXPORT : MACOS_SDK_DIR 54PATCH_FILES+=nss_macosx.patch 55.ENDIF # "$(OS)"=="MACOSX" 56 57.IF "$(debug)" != "" 58.ELSE 59BUILD_OPT=1 60.EXPORT: BUILD_OPT 61.ENDIF 62 63.IF "$(GUI)"=="UNX" 64.IF "$(OS)$(COM)"=="LINUXGCC" 65.IF "$(BUILD64)"=="1" 66# force 64-bit buildmode 67USE_64:=1 68.EXPORT : USE_64 69.ENDIF # "$(CPU)"=="X" 70.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 71 72.IF "$(OS)$(COM)"=="FREEBSDGCC" 73.IF "$(CPU)"=="X" 74# force 64-bit buildmode 75USE_64:=1 76.EXPORT : USE_64 77.ENDIF # "$(CPU)"=="X" 78.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 79 80.IF "$(OS)"=="MACOSX" 81.IF "$(EXTRA_CFLAGS)"!="" 82CPP:=gcc -E $(EXTRA_CFLAGS) 83CXX:=g++ $(EXTRA_CFLAGS) 84CC:=gcc $(EXTRA_CFLAGS) 85.EXPORT : CPP 86.ENDIF # "$(EXTRA_CFLAGS)"!="" 87.ENDIF # "$(OS)"=="MACOSX" 88 89OUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST) 90 91BUILD_DIR=mozilla$/security$/nss 92BUILD_ACTION= $(GNUMAKE) nss_build_all 93#See #i105566# && moz#513024# 94.IF "$(OS)"=="LINUX" 95BUILD_ACTION+=FREEBL_NO_DEPEND=1 96PATCH_FILES+=nss_linux.patch 97.ENDIF 98 99.ENDIF # "$(GUI)"=="UNX" 100 101 102.IF "$(GUI)"=="WNT" 103 104.IF "$(COM)"=="GCC" 105 106PATCH_FILES+=nss.patch.mingw 107 108moz_build:=$(shell cygpath -p $(MOZILLABUILD)) 109PATH!:=$(moz_build)/bin:$(PATH) 110 111nss_CC=$(CC) 112nss_CXX=$(CXX) 113.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 114nss_CC+=-shared-libgcc 115nss_CXX+=-shared-libgcc 116.ENDIF 117 118nss_LIBS= 119.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 120nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 121.ENDIF 122 123 124BUILD_DIR=mozilla$/security$/nss 125BUILD_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 126 127OUT2LIB= \ 128 mozilla$/dist$/out$/lib$/libnspr4.a \ 129 mozilla$/dist$/out$/lib$/libnss3.a \ 130 mozilla$/dist$/out$/lib$/libnssdbm3.a \ 131 mozilla$/dist$/out$/lib$/libnssutil3.a \ 132 mozilla$/dist$/out$/lib$/libplc4.a \ 133 mozilla$/dist$/out$/lib$/libplds4.a \ 134 mozilla$/dist$/out$/lib$/libsmime3.a \ 135 mozilla$/dist$/out$/lib$/libsoftokn3.a \ 136 mozilla$/dist$/out$/lib$/libsqlite3.a \ 137 mozilla$/dist$/out$/lib$/libssl3.a 138 139.ELSE # "$(COM)"=="GCC" 140MOZ_MSVCVERSION= 9 141.EXPORT : MOZ_MSVCVERSION 142moz_build:=$(shell cygpath -p $(MOZILLABUILD)) 143 144#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll 145#become libnspr4.dll, libplc4.dll, libplds4.dll 146#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000). 147#OS_TARGET= WINNT 148OS_TARGET=WIN95 149.EXPORT : OS_TARGET 150 151# make use of stlport headerfiles 152EXT_USE_STLPORT=TRUE 153 154#To build nss one has to call "make nss_build_all" in 155#mozilla/security/nss 156NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/mozilla/security/nss) 157BUILD_ACTION= PATH="$(moz_build)/msys/bin:$(moz_build)/moztools/bin:$(PATH)" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \ 158 -c "cd $(NSS_BUILD_DIR) && make nss_build_all" 159 160OUT2LIB= \ 161 mozilla$/dist$/out$/lib$/nspr4.lib \ 162 mozilla$/dist$/out$/lib$/nss3.lib \ 163 mozilla$/dist$/out$/lib$/nssdbm3.lib \ 164 mozilla$/dist$/out$/lib$/nssutil3.lib \ 165 mozilla$/dist$/out$/lib$/plc4.lib \ 166 mozilla$/dist$/out$/lib$/plds4.lib \ 167 mozilla$/dist$/out$/lib$/smime3.lib \ 168 mozilla$/dist$/out$/lib$/softokn3.lib \ 169 mozilla$/dist$/out$/lib$/sqlite3.lib \ 170 mozilla$/dist$/out$/lib$/ssl3.lib 171 172.ENDIF # "$(COM)"=="GCC" 173 174OUT2BIN=mozilla$/dist$/out$/lib$/*$(DLLPOST) 175.ENDIF # "$(GUI)"=="WNT" 176 177 178OUTDIR2INC=mozilla$/dist$/public$/nss mozilla$/dist$/out$/include 179 180# --- Targets ------------------------------------------------------ 181 182.INCLUDE : set_ext.mk 183.INCLUDE : target.mk 184.INCLUDE : tg_ext.mk 185 186.ENDIF 187