xref: /trunk/main/nss/makefile.mk (revision 1e1ac450)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22
23
24PRJ=.
25
26PRJNAME=nss
27TARGET=nss
28
29# --- Settings -----------------------------------------------------
30
31.INCLUDE :	settings.mk
32
33# --- Files --------------------------------------------------------
34
35.IF "$(ENABLE_NSS_MODULE)"!="YES" || "$(SYSTEM_NSS)"=="YES"
36
37all:
38	@echo "NSS will not be built because ENABLE_NSS_MODULE='$(ENABLE_NSS_MODULE)' and SYSTEM_NSS='$(SYSTEM_NSS)'"
39
40.ELSE
41
42TARFILE_NAME=nss-3.14.4-with-nspr-4.9.5
43TARFILE_MD5=067a04150b1d8b64f7da3019688a7547
44TARFILE_ROOTDIR=nss-3.14.4
45PATCH_FILES=nss.patch
46
47.IF "$(OS)"=="MACOSX"
48MACOS_SDK_DIR=$(SDK_PATH)
49.EXPORT : MACOS_SDK_DIR
50PATCH_FILES+=nss_macosx.patch
51.ENDIF # "$(OS)"=="MACOSX"
52
53.IF "$(debug)" != ""
54.ELSE
55BUILD_OPT=1
56.EXPORT: BUILD_OPT
57.ENDIF
58
59.IF "$(BUILD64)"=="1"
60# force the 64-bit build mode for 64bit targets
61USE_64:=1
62.EXPORT : USE_64
63.ENDIF # "$(BUILD64)"=="1"
64
65OUT2LIB=mozilla$/dist$/out$/lib$/*$(DLLPOST)
66
67BUILD_DIR=mozilla$/security$/nss
68BUILD_ACTION= $(GNUMAKE) nss_build_all
69#See #i105566# && moz#513024#
70.IF "$(OS)"=="LINUX"
71BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1
72PATCH_FILES+=nss_linux.patch
73.ENDIF
74
75
76.IF "$(GUI)"=="WNT"
77
78.IF "$(COM)"=="GCC"
79
80PATCH_FILES+=nss.patch.mingw
81
82moz_build:=$(shell cygpath -p $(MOZILLABUILD))
83PATH!:=$(moz_build)/bin:$(PATH)
84
85nss_CC=$(CC)
86nss_CXX=$(CXX)
87.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
88nss_CC+=-shared-libgcc
89nss_CXX+=-shared-libgcc
90.ENDIF
91
92nss_LIBS=
93.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
94nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
95.ENDIF
96
97
98BUILD_DIR=mozilla$/security$/nss
99BUILD_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
100
101OUT2LIB= \
102	mozilla$/dist$/out$/lib$/libnspr4.a \
103	mozilla$/dist$/out$/lib$/libnss3.a \
104	mozilla$/dist$/out$/lib$/libnssdbm3.a \
105	mozilla$/dist$/out$/lib$/libnssutil3.a \
106	mozilla$/dist$/out$/lib$/libplc4.a \
107	mozilla$/dist$/out$/lib$/libplds4.a \
108	mozilla$/dist$/out$/lib$/libsmime3.a \
109	mozilla$/dist$/out$/lib$/libsoftokn3.a \
110	mozilla$/dist$/out$/lib$/libsqlite3.a \
111	mozilla$/dist$/out$/lib$/libssl3.a
112
113.ELSE			# "$(COM)"=="GCC"
114MOZ_MSVCVERSION= 9
115.EXPORT : MOZ_MSVCVERSION
116moz_build:=$(shell cygpath -p $(MOZILLABUILD))
117
118#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
119#become libnspr4.dll, libplc4.dll, libplds4.dll
120#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
121#OS_TARGET= WINNT
122OS_TARGET=WIN95
123.EXPORT : OS_TARGET
124
125# make use of stlport headerfiles
126EXT_USE_STLPORT=TRUE
127
128#To build nss one has to call "make nss_build_all" in
129#mozilla/security/nss
130NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/mozilla/security/nss)
131BUILD_ACTION= PATH="$(PATH):$(moz_build)/msys/bin:$(moz_build)/moztools/bin" && $(subst,/,$/ $(MOZILLABUILD)/msys/bin/bash) -i \
132	-c "cd $(NSS_BUILD_DIR) && make nss_build_all"
133
134OUT2LIB= \
135	mozilla$/dist$/out$/lib$/nspr4.lib \
136	mozilla$/dist$/out$/lib$/nss3.lib \
137	mozilla$/dist$/out$/lib$/nssdbm3.lib \
138	mozilla$/dist$/out$/lib$/nssutil3.lib \
139	mozilla$/dist$/out$/lib$/plc4.lib \
140	mozilla$/dist$/out$/lib$/plds4.lib \
141	mozilla$/dist$/out$/lib$/smime3.lib \
142	mozilla$/dist$/out$/lib$/softokn3.lib \
143	mozilla$/dist$/out$/lib$/sqlite3.lib \
144	mozilla$/dist$/out$/lib$/ssl3.lib
145
146.ENDIF			# "$(COM)"=="GCC"
147
148OUT2BIN=mozilla$/dist$/out$/lib$/*$(DLLPOST)
149.ENDIF			# "$(GUI)"=="WNT"
150
151
152OUTDIR2INC=mozilla$/dist$/public$/nss mozilla$/dist$/out$/include
153
154# --- Targets ------------------------------------------------------
155
156.INCLUDE : set_ext.mk
157.INCLUDE :	target.mk
158.INCLUDE :	tg_ext.mk
159
160.ENDIF
161