xref: /aoo42x/main/nss/makefile.mk (revision c38ced1b)
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
42*c38ced1bSHerbert DürrTARFILE_NAME=nss-3.14.4-with-nspr-4.9.5
43*c38ced1bSHerbert DürrTARFILE_MD5=067a04150b1d8b64f7da3019688a7547
44*c38ced1bSHerbert DürrTARFILE_ROOTDIR=nss-3.14.4
45cdf0e10cSrcweirPATCH_FILES=nss.patch
46cdf0e10cSrcweir
47cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
481439c24fSJürgen SchmidtMACOS_SDK_DIR=/Developer/SDKs/MacOSX10.4u.sdk
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 "$(GUI)"=="UNX"
60cdf0e10cSrcweir.IF "$(OS)$(COM)"=="LINUXGCC"
61cdf0e10cSrcweir.IF "$(BUILD64)"=="1"
62cdf0e10cSrcweir# force 64-bit buildmode
63cdf0e10cSrcweirUSE_64:=1
64cdf0e10cSrcweir.EXPORT : USE_64
65cdf0e10cSrcweir.ENDIF			# "$(CPU)"=="X"
66cdf0e10cSrcweir.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
67cdf0e10cSrcweir
68cdf0e10cSrcweir.IF "$(OS)$(COM)"=="FREEBSDGCC"
69cdf0e10cSrcweir.IF "$(CPU)"=="X"
70cdf0e10cSrcweir# force 64-bit buildmode
71cdf0e10cSrcweirUSE_64:=1
72cdf0e10cSrcweir.EXPORT : USE_64
73cdf0e10cSrcweir.ENDIF			# "$(CPU)"=="X"
74cdf0e10cSrcweir.ENDIF                  # "$(OS)$(COM)"=="LINUXGCC"
75cdf0e10cSrcweir
76cdf0e10cSrcweir.IF "$(OS)"=="MACOSX"
77cdf0e10cSrcweir.IF "$(EXTRA_CFLAGS)"!=""
78cdf0e10cSrcweirCPP:=gcc -E $(EXTRA_CFLAGS)
79cdf0e10cSrcweirCXX:=g++ $(EXTRA_CFLAGS)
80cdf0e10cSrcweirCC:=gcc $(EXTRA_CFLAGS)
811439c24fSJürgen Schmidt.EXPORT : CPP
82cdf0e10cSrcweir.ENDIF # "$(EXTRA_CFLAGS)"!=""
83cdf0e10cSrcweir.ENDIF # "$(OS)"=="MACOSX"
84cdf0e10cSrcweir
85cdf0e10cSrcweirOUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST)
86cdf0e10cSrcweir
87cdf0e10cSrcweirBUILD_DIR=mozilla$/security$/nss
88cdf0e10cSrcweirBUILD_ACTION= $(GNUMAKE) nss_build_all
89cdf0e10cSrcweir#See #i105566# && moz#513024#
90cdf0e10cSrcweir.IF "$(OS)"=="LINUX"
91cdf0e10cSrcweirBUILD_ACTION+=FREEBL_NO_DEPEND=1
92645b2185SHerbert DürrPATCH_FILES+=nss_linux.patch nspr-4.8.4-clang.patch
93cdf0e10cSrcweir.ENDIF
94cdf0e10cSrcweir
95cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="UNX"
96cdf0e10cSrcweir
97cdf0e10cSrcweir
98cdf0e10cSrcweir.IF "$(GUI)"=="WNT"
99cdf0e10cSrcweir
100cdf0e10cSrcweir.IF "$(COM)"=="GCC"
101cdf0e10cSrcweir
102cdf0e10cSrcweirPATCH_FILES+=nss.patch.mingw
103cdf0e10cSrcweir
104cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
105cdf0e10cSrcweirPATH!:=$(moz_build)/bin:$(PATH)
106cdf0e10cSrcweir
107cdf0e10cSrcweirnss_CC=$(CC)
108cdf0e10cSrcweirnss_CXX=$(CXX)
109cdf0e10cSrcweir.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
110cdf0e10cSrcweirnss_CC+=-shared-libgcc
111cdf0e10cSrcweirnss_CXX+=-shared-libgcc
112cdf0e10cSrcweir.ENDIF
113cdf0e10cSrcweir
114cdf0e10cSrcweirnss_LIBS=
115cdf0e10cSrcweir.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
116cdf0e10cSrcweirnss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
117cdf0e10cSrcweir.ENDIF
118cdf0e10cSrcweir
119cdf0e10cSrcweir
120cdf0e10cSrcweirBUILD_DIR=mozilla$/security$/nss
121cdf0e10cSrcweirBUILD_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
122cdf0e10cSrcweir
123cdf0e10cSrcweirOUT2LIB= \
124cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libnspr4.a \
125cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libnss3.a \
126cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libnssdbm3.a \
127cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libnssutil3.a \
128cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libplc4.a \
129cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libplds4.a \
130cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libsmime3.a \
131cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libsoftokn3.a \
132cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libsqlite3.a \
133cdf0e10cSrcweir	mozilla$/dist$/out$/lib$/libssl3.a
134cdf0e10cSrcweir
135cdf0e10cSrcweir.ELSE			# "$(COM)"=="GCC"
136cdf0e10cSrcweirMOZ_MSVCVERSION= 9
137cdf0e10cSrcweir.EXPORT : MOZ_MSVCVERSION
138cdf0e10cSrcweirmoz_build:=$(shell cygpath -p $(MOZILLABUILD))
139cdf0e10cSrcweir
140cdf0e10cSrcweir#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
141cdf0e10cSrcweir#become libnspr4.dll, libplc4.dll, libplds4.dll
142cdf0e10cSrcweir#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
143cdf0e10cSrcweir#OS_TARGET= WINNT
144cdf0e10cSrcweirOS_TARGET=WIN95
145cdf0e10cSrcweir.EXPORT : OS_TARGET
146cdf0e10cSrcweir
147cdf0e10cSrcweir# make use of stlport headerfiles
148cdf0e10cSrcweirEXT_USE_STLPORT=TRUE
149cdf0e10cSrcweir
150cdf0e10cSrcweir#To build nss one has to call "make nss_build_all" in
151cdf0e10cSrcweir#mozilla/security/nss
152cdf0e10cSrcweirNSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/mozilla/security/nss)
15347589224SJürgen SchmidtBUILD_ACTION= PATH="$(PATH):$(moz_build)/msys/bin:$(moz_build)/moztools/bin" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \
154cdf0e10cSrcweir	-c "cd $(NSS_BUILD_DIR) && make nss_build_all"
155cdf0e10cSrcweir
156cdf0e10cSrcweirOUT2LIB= \
157515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/nspr4.lib \
158515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/nss3.lib \
159515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/nssdbm3.lib \
160515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/nssutil3.lib \
161515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/plc4.lib \
162515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/plds4.lib \
163515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/smime3.lib \
164515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/softokn3.lib \
165515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/sqlite3.lib \
166515ef96aSAndre Fischer	mozilla$/dist$/out$/lib$/ssl3.lib
167cdf0e10cSrcweir
168cdf0e10cSrcweir.ENDIF			# "$(COM)"=="GCC"
169cdf0e10cSrcweir
170cdf0e10cSrcweirOUT2BIN=mozilla$/dist$/out$/lib$/*$(DLLPOST)
171cdf0e10cSrcweir.ENDIF			# "$(GUI)"=="WNT"
172cdf0e10cSrcweir
173cdf0e10cSrcweir
174cdf0e10cSrcweirOUTDIR2INC=mozilla$/dist$/public$/nss mozilla$/dist$/out$/include
175cdf0e10cSrcweir
176cdf0e10cSrcweir# --- Targets ------------------------------------------------------
177cdf0e10cSrcweir
178cdf0e10cSrcweir.INCLUDE : set_ext.mk
179cdf0e10cSrcweir.INCLUDE :	target.mk
180cdf0e10cSrcweir.INCLUDE :	tg_ext.mk
1819ef65f0eSAndre Fischer
1829ef65f0eSAndre Fischer.ENDIF
183