xref: /aoo41x/main/nss/makefile.mk (revision 3bc678c7)
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.25-with-nspr-4.12
43TARFILE_MD5=4ec9a36c0f7c9360b149491c013b8d50
44TARFILE_ROOTDIR=nss-3.25
45PATCH_FILES=nss.patch \
46	nss_bug_1438426.patch \
47	nss_bug_1348767.patch \
48	nss_bug_1437734.patch
49
50.IF "$(OS)"=="MACOSX"
51MACOS_SDK_DIR=$(SDK_PATH)
52.EXPORT : MACOS_SDK_DIR
53PATCH_FILES+=nss_macosx.patch
54.ENDIF # "$(OS)"=="MACOSX"
55
56.IF "$(debug)" != ""
57.ELSE
58BUILD_OPT=1
59.EXPORT: BUILD_OPT
60.ENDIF
61
62.IF "$(BUILD64)"=="1"
63# force the 64-bit build mode for 64bit targets
64USE_64:=1
65.EXPORT : USE_64
66.ENDIF # "$(BUILD64)"=="1"
67
68OUT2LIB=dist$/out$/lib$/*$(DLLPOST)
69
70BUILD_DIR=nss
71BUILD_ACTION= $(GNUMAKE) nss_build_all
72#See #i105566# && moz#513024#
73.IF "$(OS)"=="LINUX"
74BUILD_ACTION+=FREEBL_NO_DEPEND=1 FREEBL_LOWHASH=1 NSS_DISABLE_GTESTS=1
75PATCH_FILES+=nss_linux.patch
76.ENDIF
77
78.IF "$(OS)"=="FREEBSD"
79BUILD_ACTION+=NSS_DISABLE_GTESTS=1
80.ENDIF
81
82
83.IF "$(GUI)"=="WNT"
84
85.IF "$(COM)"=="GCC"
86
87PATCH_FILES+=nss.patch.mingw
88
89moz_build:=$(shell cygpath -p $(MOZILLABUILD))
90PATH!:=$(moz_build)/bin:$(PATH)
91
92nss_CC=$(CC)
93nss_CXX=$(CXX)
94.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
95nss_CC+=-shared-libgcc
96nss_CXX+=-shared-libgcc
97.ENDIF
98
99nss_LIBS=
100.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
101nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
102.ENDIF
103
104
105BUILD_DIR=nss
106BUILD_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
107
108OUT2LIB= \
109	dist$/out$/lib$/libnspr4.a \
110	dist$/out$/lib$/libnss3.a \
111	dist$/out$/lib$/libnssdbm3.a \
112	dist$/out$/lib$/libnssutil3.a \
113	dist$/out$/lib$/libplc4.a \
114	dist$/out$/lib$/libplds4.a \
115	dist$/out$/lib$/libsmime3.a \
116	dist$/out$/lib$/libsoftokn3.a \
117	dist$/out$/lib$/libsqlite3.a \
118	dist$/out$/lib$/libssl3.a
119
120.ELSE			# "$(COM)"=="GCC"
121MOZ_MSVCVERSION= 9
122.EXPORT : MOZ_MSVCVERSION
123moz_build:=$(shell cygpath -p $(MOZILLABUILD))
124
125#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
126#become libnspr4.dll, libplc4.dll, libplds4.dll
127#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
128#OS_TARGET= WINNT
129OS_TARGET=WIN95
130.EXPORT : OS_TARGET
131
132# make use of stlport headerfiles
133EXT_USE_STLPORT=TRUE
134
135# To build nss one has to call "make nss_build_all" in nss
136NSS_BUILD_DIR= $(subst,\,/ $(PWD)/$(MISC)/build/$(TARFILE_ROOTDIR)/nss)
137BUILD_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 \
138	-c "cd $(NSS_BUILD_DIR) && make nss_build_all NSS_DISABLE_GTESTS=1"
139
140OUT2LIB= \
141	dist$/out$/lib$/nspr4.lib \
142	dist$/out$/lib$/nss3.lib \
143	dist$/out$/lib$/nssdbm3.lib \
144	dist$/out$/lib$/nssutil3.lib \
145	dist$/out$/lib$/plc4.lib \
146	dist$/out$/lib$/plds4.lib \
147	dist$/out$/lib$/smime3.lib \
148	dist$/out$/lib$/softokn3.lib \
149	dist$/out$/lib$/sqlite3.lib \
150	dist$/out$/lib$/ssl3.lib
151
152.ENDIF			# "$(COM)"=="GCC"
153
154OUT2BIN=dist$/out$/lib$/*$(DLLPOST)
155.ENDIF			# "$(GUI)"=="WNT"
156
157
158OUTDIR2INC=dist$/public$/nss dist$/out$/include
159
160# --- Targets ------------------------------------------------------
161
162.INCLUDE : set_ext.mk
163.INCLUDE :	target.mk
164.INCLUDE :	tg_ext.mk
165
166.ENDIF
167