xref: /aoo42x/main/nss/makefile.mk (revision 4fd7cfbc)
17871dc3eSAndrew Rist#**************************************************************
27871dc3eSAndrew Rist#
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
107871dc3eSAndrew Rist#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
127871dc3eSAndrew Rist#
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.
197871dc3eSAndrew Rist#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirPRJ=.
25cdf0e10cSrcweir
26cdf0e10cSrcweirPRJNAME=nss
27cdf0e10cSrcweirTARGET=nss
28cdf0e10cSrcweir
29cdf0e10cSrcweir# --- Settings -----------------------------------------------------
30cdf0e10cSrcweir
31cdf0e10cSrcweir.INCLUDE :	settings.mk
32cdf0e10cSrcweir
33cdf0e10cSrcweir# --- Files --------------------------------------------------------
34cdf0e10cSrcweir
350021cf80SHerbert Dürr.IF "$(ENABLE_NSS_MODULE)"!="YES" || "$(SYSTEM_NSS)"=="YES"
369ef65f0eSAndre Fischer
37cdf0e10cSrcweirall:
380021cf80SHerbert Dürr	@echo "NSS will not be built because ENABLE_NSS_MODULE='$(ENABLE_NSS_MODULE)' and SYSTEM_NSS='$(SYSTEM_NSS)'"
399ef65f0eSAndre Fischer
409ef65f0eSAndre Fischer.ELSE
41cdf0e10cSrcweir
425ec3c564SDon LewisTARFILE_NAME=nss-3.39-with-nspr-4.20
435ec3c564SDon LewisTARFILE_MD5=8ac77166663de5c33bba6cb3d0066929
445ec3c564SDon LewisTARFILE_ROOTDIR=nss-3.39
455ec3c564SDon LewisPATCH_FILES=nss.patch
46*4fd7cfbcSArrigo MarchioriPATCH_FILES+=nss_sizes.patch
47cdf0e10cSrcweir
48cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
491e1ac450SHerbert DürrMACOS_SDK_DIR=$(SDK_PATH)
501439c24fSJürgen Schmidt.EXPORT : MACOS_SDK_DIR
51cdf0e10cSrcweirPATCH_FILES+=nss_macosx.patch
52cdf0e10cSrcweir.ENDIF # "$(OS)"=="MACOSX"
53cdf0e10cSrcweir
54cdf0e10cSrcweir.IF "$(debug)" != ""
55cdf0e10cSrcweir.ELSE
56cdf0e10cSrcweirBUILD_OPT=1
57cdf0e10cSrcweir.EXPORT: BUILD_OPT
58cdf0e10cSrcweir.ENDIF
59cdf0e10cSrcweir
60cdf0e10cSrcweir.IF "$(BUILD64)"=="1"
61fb2e0c6fSHerbert Dürr# force the 64-bit build mode for 64bit targets
62cdf0e10cSrcweirUSE_64:=1
63cdf0e10cSrcweir.EXPORT : USE_64
64fb2e0c6fSHerbert Dürr.ENDIF # "$(BUILD64)"=="1"
65cdf0e10cSrcweir
665ec3c564SDon LewisOUT2LIB=dist$/*.OBJ$/lib$/*$(DLLPOST)
67cdf0e10cSrcweir
68282fc96fStruckmanBUILD_DIR=nss
69cdf0e10cSrcweirBUILD_ACTION= $(GNUMAKE) nss_build_all
70cdf0e10cSrcweir#See #i105566# && moz#513024#
71cdf0e10cSrcweir.IF "$(OS)"=="LINUX"
72282fc96fStruckmanBUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1
7315887683SHerbert DürrPATCH_FILES+=nss_linux.patch
74cdf0e10cSrcweir.ENDIF
75cdf0e10cSrcweir
76282fc96fStruckman.IF "$(OS)"=="FREEBSD"
77f44f5fe4StruckmanBUILD_ACTION+=NSS_DISABLE_GTESTS=1
78282fc96fStruckman.ENDIF
79282fc96fStruckman
80cdf0e10cSrcweir
81cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
82cdf0e10cSrcweir
83cdf0e10cSrcweir.IF "$(COM)"=="GCC"
84cdf0e10cSrcweir
85cdf0e10cSrcweirPATCH_FILES+=nss.patch.mingw
86cdf0e10cSrcweir
87cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
88cdf0e10cSrcweirPATH!:=$(moz_build)/bin:$(PATH)
89cdf0e10cSrcweir
90cdf0e10cSrcweirnss_CC=$(CC)
91cdf0e10cSrcweirnss_CXX=$(CXX)
92cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
93cdf0e10cSrcweirnss_CC+=-shared-libgcc
94cdf0e10cSrcweirnss_CXX+=-shared-libgcc
95cdf0e10cSrcweir.ENDIF
96cdf0e10cSrcweir
97cdf0e10cSrcweirnss_LIBS=
98cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
99cdf0e10cSrcweirnss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
100cdf0e10cSrcweir.ENDIF
101cdf0e10cSrcweir
102cdf0e10cSrcweir
103282fc96fStruckmanBUILD_DIR=nss
104282fc96fStruckmanBUILD_ACTION= NSS_DISABLE_GTESTS=1 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
105cdf0e10cSrcweir
106cdf0e10cSrcweirOUT2LIB= \
1075ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libnspr4.a \
1085ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libnss3.a \
1095ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libnssdbm3.a \
1105ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libnssutil3.a \
1115ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libplc4.a \
1125ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libplds4.a \
1135ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libsmime3.a \
1145ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libsoftokn3.a \
1155ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libsqlite3.a \
1165ec3c564SDon Lewis	dist$/*.OBJ$/lib$/libssl3.a
117cdf0e10cSrcweir
118cdf0e10cSrcweir.ELSE			# "$(COM)"=="GCC"
119cdf0e10cSrcweirMOZ_MSVCVERSION= 9
120cdf0e10cSrcweir.EXPORT : MOZ_MSVCVERSION
121210bcd3aSDon LewisPATCH_FILES+=nss_win.patch
122cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
123cdf0e10cSrcweir
124cdf0e10cSrcweir#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
125cdf0e10cSrcweir#become libnspr4.dll, libplc4.dll, libplds4.dll
126cdf0e10cSrcweir#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
127cdf0e10cSrcweir#OS_TARGET= WINNT
128cdf0e10cSrcweirOS_TARGET=WIN95
129cdf0e10cSrcweir.EXPORT : OS_TARGET
130cdf0e10cSrcweir
131cdf0e10cSrcweir# make use of stlport headerfiles
132cdf0e10cSrcweirEXT_USE_STLPORT=TRUE
133cdf0e10cSrcweir
134c4e06ec6SMatthias Seidel# To build nss one has to call "make nss_build_all" in nss
135282fc96fStruckmanNSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/nss)
136c4e06ec6SMatthias 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 \
137282fc96fStruckman	-c "cd $(NSS_BUILD_DIR) && make nss_build_all NSS_DISABLE_GTESTS=1"
138cdf0e10cSrcweir
139cdf0e10cSrcweirOUT2LIB= \
1405ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/nspr4.lib \
1415ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/nss3.lib \
1425ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/nssdbm3.lib \
1435ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/nssutil3.lib \
1445ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/plc4.lib \
1455ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/plds4.lib \
1465ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/smime3.lib \
1475ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/softokn3.lib \
1485ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/sqlite3.lib \
1495ec3c564SDon Lewis	dist$/WIN954.0_OPT.OBJ$/lib$/ssl3.lib
150cdf0e10cSrcweir
151cdf0e10cSrcweir.ENDIF			# "$(COM)"=="GCC"
152cdf0e10cSrcweir
1535ec3c564SDon LewisOUT2BIN=dist$/WIN954.0_OPT.OBJ$/lib$/*$(DLLPOST)
154cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
155cdf0e10cSrcweir
156cdf0e10cSrcweir
1575ec3c564SDon LewisOUTDIR2INC=dist$/public$/nss dist$/*.OBJ$/include
158cdf0e10cSrcweir
159cdf0e10cSrcweir# --- Targets ------------------------------------------------------
160cdf0e10cSrcweir
161cdf0e10cSrcweir.INCLUDE : set_ext.mk
162cdf0e10cSrcweir.INCLUDE :	target.mk
163cdf0e10cSrcweir.INCLUDE :	tg_ext.mk
1649ef65f0eSAndre Fischer
1659ef65f0eSAndre Fischer.ENDIF
166