xref: /aoo42x/main/nss/makefile.mk (revision f44f5fe4)
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
42282fc96fStruckmanTARFILE_NAME=nss-3.25-with-nspr-4.12
43282fc96fStruckmanTARFILE_MD5=4ec9a36c0f7c9360b149491c013b8d50
44282fc96fStruckmanTARFILE_ROOTDIR=nss-3.25
45cdf0e10cSrcweirPATCH_FILES=nss.patch
46cdf0e10cSrcweir
47cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
481e1ac450SHerbert DürrMACOS_SDK_DIR=$(SDK_PATH)
491439c24fSJürgen Schmidt.EXPORT : MACOS_SDK_DIR
50cdf0e10cSrcweirPATCH_FILES+=nss_macosx.patch
51cdf0e10cSrcweir.ENDIF # "$(OS)"=="MACOSX"
52cdf0e10cSrcweir
53cdf0e10cSrcweir.IF "$(debug)" != ""
54cdf0e10cSrcweir.ELSE
55cdf0e10cSrcweirBUILD_OPT=1
56cdf0e10cSrcweir.EXPORT: BUILD_OPT
57cdf0e10cSrcweir.ENDIF
58cdf0e10cSrcweir
59cdf0e10cSrcweir.IF "$(BUILD64)"=="1"
60fb2e0c6fSHerbert Dürr# force the 64-bit build mode for 64bit targets
61cdf0e10cSrcweirUSE_64:=1
62cdf0e10cSrcweir.EXPORT : USE_64
63fb2e0c6fSHerbert Dürr.ENDIF # "$(BUILD64)"=="1"
64cdf0e10cSrcweir
65282fc96fStruckmanOUT2LIB=dist$/out$/lib$/*$(DLLPOST)
66cdf0e10cSrcweir
67282fc96fStruckmanBUILD_DIR=nss
68cdf0e10cSrcweirBUILD_ACTION= $(GNUMAKE) nss_build_all
69cdf0e10cSrcweir#See #i105566# && moz#513024#
70cdf0e10cSrcweir.IF "$(OS)"=="LINUX"
71282fc96fStruckmanBUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1
7215887683SHerbert DürrPATCH_FILES+=nss_linux.patch
73cdf0e10cSrcweir.ENDIF
74cdf0e10cSrcweir
75282fc96fStruckman.IF "$(OS)"=="FREEBSD"
76*f44f5fe4StruckmanBUILD_ACTION+=NSS_DISABLE_GTESTS=1
77282fc96fStruckman.ENDIF
78282fc96fStruckman
79cdf0e10cSrcweir
80cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
81cdf0e10cSrcweir
82cdf0e10cSrcweir.IF "$(COM)"=="GCC"
83cdf0e10cSrcweir
84cdf0e10cSrcweirPATCH_FILES+=nss.patch.mingw
85cdf0e10cSrcweir
86cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
87cdf0e10cSrcweirPATH!:=$(moz_build)/bin:$(PATH)
88cdf0e10cSrcweir
89cdf0e10cSrcweirnss_CC=$(CC)
90cdf0e10cSrcweirnss_CXX=$(CXX)
91cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
92cdf0e10cSrcweirnss_CC+=-shared-libgcc
93cdf0e10cSrcweirnss_CXX+=-shared-libgcc
94cdf0e10cSrcweir.ENDIF
95cdf0e10cSrcweir
96cdf0e10cSrcweirnss_LIBS=
97cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
98cdf0e10cSrcweirnss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
99cdf0e10cSrcweir.ENDIF
100cdf0e10cSrcweir
101cdf0e10cSrcweir
102282fc96fStruckmanBUILD_DIR=nss
103282fc96fStruckmanBUILD_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
104cdf0e10cSrcweir
105cdf0e10cSrcweirOUT2LIB= \
106282fc96fStruckman	dist$/out$/lib$/libnspr4.a \
107282fc96fStruckman	dist$/out$/lib$/libnss3.a \
108282fc96fStruckman	dist$/out$/lib$/libnssdbm3.a \
109282fc96fStruckman	dist$/out$/lib$/libnssutil3.a \
110282fc96fStruckman	dist$/out$/lib$/libplc4.a \
111282fc96fStruckman	dist$/out$/lib$/libplds4.a \
112282fc96fStruckman	dist$/out$/lib$/libsmime3.a \
113282fc96fStruckman	dist$/out$/lib$/libsoftokn3.a \
114282fc96fStruckman	dist$/out$/lib$/libsqlite3.a \
115282fc96fStruckman	dist$/out$/lib$/libssl3.a
116cdf0e10cSrcweir
117cdf0e10cSrcweir.ELSE			# "$(COM)"=="GCC"
118cdf0e10cSrcweirMOZ_MSVCVERSION= 9
119cdf0e10cSrcweir.EXPORT : MOZ_MSVCVERSION
120cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
121cdf0e10cSrcweir
122cdf0e10cSrcweir#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
123cdf0e10cSrcweir#become libnspr4.dll, libplc4.dll, libplds4.dll
124cdf0e10cSrcweir#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
125cdf0e10cSrcweir#OS_TARGET= WINNT
126cdf0e10cSrcweirOS_TARGET=WIN95
127cdf0e10cSrcweir.EXPORT : OS_TARGET
128cdf0e10cSrcweir
129cdf0e10cSrcweir# make use of stlport headerfiles
130cdf0e10cSrcweirEXT_USE_STLPORT=TRUE
131cdf0e10cSrcweir
132cdf0e10cSrcweir#To build nss one has to call "make nss_build_all" in
133282fc96fStruckman#nss
134282fc96fStruckmanNSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/nss)
13547589224SJürgen SchmidtBUILD_ACTION= PATH="$(PATH):$(moz_build)/msys/bin:$(moz_build)/moztools/bin" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \
136282fc96fStruckman	-c "cd $(NSS_BUILD_DIR) && make nss_build_all NSS_DISABLE_GTESTS=1"
137cdf0e10cSrcweir
138cdf0e10cSrcweirOUT2LIB= \
139282fc96fStruckman	dist$/out$/lib$/nspr4.lib \
140282fc96fStruckman	dist$/out$/lib$/nss3.lib \
141282fc96fStruckman	dist$/out$/lib$/nssdbm3.lib \
142282fc96fStruckman	dist$/out$/lib$/nssutil3.lib \
143282fc96fStruckman	dist$/out$/lib$/plc4.lib \
144282fc96fStruckman	dist$/out$/lib$/plds4.lib \
145282fc96fStruckman	dist$/out$/lib$/smime3.lib \
146282fc96fStruckman	dist$/out$/lib$/softokn3.lib \
147282fc96fStruckman	dist$/out$/lib$/sqlite3.lib \
148282fc96fStruckman	dist$/out$/lib$/ssl3.lib
149cdf0e10cSrcweir
150cdf0e10cSrcweir.ENDIF			# "$(COM)"=="GCC"
151cdf0e10cSrcweir
152282fc96fStruckmanOUT2BIN=dist$/out$/lib$/*$(DLLPOST)
153cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
154cdf0e10cSrcweir
155cdf0e10cSrcweir
156282fc96fStruckmanOUTDIR2INC=dist$/public$/nss dist$/out$/include
157cdf0e10cSrcweir
158cdf0e10cSrcweir# --- Targets ------------------------------------------------------
159cdf0e10cSrcweir
160cdf0e10cSrcweir.INCLUDE : set_ext.mk
161cdf0e10cSrcweir.INCLUDE :	target.mk
162cdf0e10cSrcweir.INCLUDE :	tg_ext.mk
1639ef65f0eSAndre Fischer
1649ef65f0eSAndre Fischer.ENDIF
165