xref: /aoo42x/main/nss/makefile.mk (revision 139463b5)
17871dc3eSAndrew Rist#**************************************************************
209e5ff2eSmseidel#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
1009e5ff2eSmseidel#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
1209e5ff2eSmseidel#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
1909e5ff2eSmseidel#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
22cdf0e10cSrcweirPRJ=.
23cdf0e10cSrcweir
24cdf0e10cSrcweirPRJNAME=nss
25cdf0e10cSrcweirTARGET=nss
26cdf0e10cSrcweir
27cdf0e10cSrcweir# --- Settings -----------------------------------------------------
28cdf0e10cSrcweir
29cdf0e10cSrcweir.INCLUDE :	settings.mk
30cdf0e10cSrcweir
31cdf0e10cSrcweir# --- Files --------------------------------------------------------
32cdf0e10cSrcweir
330021cf80SHerbert Dürr.IF "$(ENABLE_NSS_MODULE)"!="YES" || "$(SYSTEM_NSS)"=="YES"
349ef65f0eSAndre Fischer
35cdf0e10cSrcweirall:
360021cf80SHerbert Dürr	@echo "NSS will not be built because ENABLE_NSS_MODULE='$(ENABLE_NSS_MODULE)' and SYSTEM_NSS='$(SYSTEM_NSS)'"
379ef65f0eSAndre Fischer
389ef65f0eSAndre Fischer.ELSE
39cdf0e10cSrcweir
405ec3c564SDon LewisTARFILE_NAME=nss-3.39-with-nspr-4.20
415ec3c564SDon LewisTARFILE_MD5=8ac77166663de5c33bba6cb3d0066929
425ec3c564SDon LewisTARFILE_ROOTDIR=nss-3.39
435ec3c564SDon LewisPATCH_FILES=nss.patch
444fd7cfbcSArrigo MarchioriPATCH_FILES+=nss_sizes.patch
45cdf0e10cSrcweir
46cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
471e1ac450SHerbert DürrMACOS_SDK_DIR=$(SDK_PATH)
481439c24fSJürgen Schmidt.EXPORT : MACOS_SDK_DIR
49cdf0e10cSrcweirPATCH_FILES+=nss_macosx.patch
50cdf0e10cSrcweir.ENDIF # "$(OS)"=="MACOSX"
51cdf0e10cSrcweir
52cdf0e10cSrcweir.IF "$(debug)" != ""
53cdf0e10cSrcweir.ELSE
54cdf0e10cSrcweirBUILD_OPT=1
55cdf0e10cSrcweir.EXPORT: BUILD_OPT
56cdf0e10cSrcweir.ENDIF
57cdf0e10cSrcweir
58cdf0e10cSrcweir.IF "$(BUILD64)"=="1"
59fb2e0c6fSHerbert Dürr# force the 64-bit build mode for 64bit targets
60cdf0e10cSrcweirUSE_64:=1
61cdf0e10cSrcweir.EXPORT : USE_64
62fb2e0c6fSHerbert Dürr.ENDIF # "$(BUILD64)"=="1"
63cdf0e10cSrcweir
645ec3c564SDon LewisOUT2LIB=dist$/*.OBJ$/lib$/*$(DLLPOST)
65cdf0e10cSrcweir
66282fc96fStruckmanBUILD_DIR=nss
67cdf0e10cSrcweirBUILD_ACTION= $(GNUMAKE) nss_build_all
6809e5ff2eSmseidel# See #i105566# && moz#513024#
69cdf0e10cSrcweir.IF "$(OS)"=="LINUX"
70*139463b5SArrigo MarchioriBUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1 NSS_ENABLE_WERROR=0
7115887683SHerbert DürrPATCH_FILES+=nss_linux.patch
72cdf0e10cSrcweir.ENDIF
73cdf0e10cSrcweir
74282fc96fStruckman.IF "$(OS)"=="FREEBSD"
75f44f5fe4StruckmanBUILD_ACTION+=NSS_DISABLE_GTESTS=1
76282fc96fStruckman.ENDIF
77282fc96fStruckman
78cdf0e10cSrcweir
79cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
80cdf0e10cSrcweir
81cdf0e10cSrcweir.IF "$(COM)"=="GCC"
82cdf0e10cSrcweir
83cdf0e10cSrcweirPATCH_FILES+=nss.patch.mingw
84cdf0e10cSrcweir
85cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
86cdf0e10cSrcweirPATH!:=$(moz_build)/bin:$(PATH)
87cdf0e10cSrcweir
88cdf0e10cSrcweirnss_CC=$(CC)
89cdf0e10cSrcweirnss_CXX=$(CXX)
90cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
91cdf0e10cSrcweirnss_CC+=-shared-libgcc
92cdf0e10cSrcweirnss_CXX+=-shared-libgcc
93cdf0e10cSrcweir.ENDIF
94cdf0e10cSrcweir
95cdf0e10cSrcweirnss_LIBS=
96cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
97cdf0e10cSrcweirnss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
98cdf0e10cSrcweir.ENDIF
99cdf0e10cSrcweir
100cdf0e10cSrcweir
101282fc96fStruckmanBUILD_DIR=nss
102da7ca839SMatthias SeidelBUILD_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
103cdf0e10cSrcweir
104cdf0e10cSrcweirOUT2LIB= \
1055ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libnspr4.a \
1065ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libnss3.a \
1075ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libnssdbm3.a \
1085ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libnssutil3.a \
1095ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libplc4.a \
1105ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libplds4.a \
1115ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libsmime3.a \
1125ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libsoftokn3.a \
1135ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libsqlite3.a \
1145ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libssl3.a
115cdf0e10cSrcweir
11609e5ff2eSmseidel.ELSE # "$(COM)"=="GCC"
117cdf0e10cSrcweirMOZ_MSVCVERSION= 9
118cdf0e10cSrcweir.EXPORT : MOZ_MSVCVERSION
119210bcd3aSDon LewisPATCH_FILES+=nss_win.patch
120cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
121cdf0e10cSrcweir
12209e5ff2eSmseidel# Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
12309e5ff2eSmseidel# become libnspr4.dll, libplc4.dll, libplds4.dll
12409e5ff2eSmseidel# WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
125da7ca839SMatthias SeidelOS_TARGET=WINNT
126da7ca839SMatthias Seidel#OS_TARGET=WIN95
127cdf0e10cSrcweir.EXPORT : OS_TARGET
128cdf0e10cSrcweir
129cdf0e10cSrcweir# make use of stlport headerfiles
130cdf0e10cSrcweirEXT_USE_STLPORT=TRUE
131cdf0e10cSrcweir
132c4e06ec6SMatthias Seidel# To build nss one has to call "make nss_build_all" in nss
133282fc96fStruckmanNSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/nss)
134c4e06ec6SMatthias SeidelBUILD_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 \
135282fc96fStruckman	-c "cd $(NSS_BUILD_DIR) && make nss_build_all NSS_DISABLE_GTESTS=1"
136cdf0e10cSrcweir
137cdf0e10cSrcweirOUT2LIB= \
138da7ca839SMatthias Seidel	dist$/*.OBJ$/lib$/libnspr4.lib \
13909e5ff2eSmseidel	dist$/*.OBJ$/lib$/nss3.lib \
14009e5ff2eSmseidel	dist$/*.OBJ$/lib$/nssdbm3.lib \
14109e5ff2eSmseidel	dist$/*.OBJ$/lib$/nssutil3.lib \
142da7ca839SMatthias Seidel	dist$/*.OBJ$/lib$/libplc4.lib \
143da7ca839SMatthias Seidel	dist$/*.OBJ$/lib$/libplds4.lib \
14409e5ff2eSmseidel	dist$/*.OBJ$/lib$/smime3.lib \
14509e5ff2eSmseidel	dist$/*.OBJ$/lib$/softokn3.lib \
14609e5ff2eSmseidel	dist$/*.OBJ$/lib$/sqlite3.lib \
14709e5ff2eSmseidel	dist$/*.OBJ$/lib$/ssl3.lib
148cdf0e10cSrcweir
14909e5ff2eSmseidel.ENDIF # "$(COM)"=="GCC"
150cdf0e10cSrcweir
15109e5ff2eSmseidelOUT2BIN=dist$/*.OBJ$/lib$/*$(DLLPOST)
15209e5ff2eSmseidel.ENDIF # "$(GUI)"=="WNT"
153cdf0e10cSrcweir
154cdf0e10cSrcweir
1555ec3c564SDon LewisOUTDIR2INC=dist$/public$/nss dist$/*.OBJ$/include
156cdf0e10cSrcweir
157cdf0e10cSrcweir# --- Targets ------------------------------------------------------
158cdf0e10cSrcweir
15909e5ff2eSmseidel.INCLUDE :	set_ext.mk
160cdf0e10cSrcweir.INCLUDE :	target.mk
161cdf0e10cSrcweir.INCLUDE :	tg_ext.mk
1629ef65f0eSAndre Fischer
1639ef65f0eSAndre Fischer.ENDIF
16409e5ff2eSmseidel
16509e5ff2eSmseidel# vim: set noet sw=4 ts=4:
166