1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
33 # --- Settings -----------------------------------------------------
35 .INCLUDE
: settings.mk
37 # --- Files --------------------------------------------------------
39 .IF
"$(ENABLE_NSS_MODULE)"!="YES"
41 @echo
"NSS will not be built. ENABLE_NSS_MODULE is '$(ENABLE_NSS_MODULE)'"
44 TARFILE_NAME
=nss_3_12_5
45 TARFILE_MD5
=6244eb0b6e2647ee50470951fa6efb47
46 TARFILE_ROOTDIR
=mozilla
50 PATCH_FILES
+=nss_macosx.patch
51 .ENDIF
# "$(OS)"=="MACOSX"
60 .IF
"$(OS)$(COM)"=="LINUXGCC"
62 # force 64-bit buildmode
65 .ENDIF
# "$(CPU)"=="X"
66 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
68 .IF
"$(OS)$(COM)"=="FREEBSDGCC"
70 # force 64-bit buildmode
73 .ENDIF
# "$(CPU)"=="X"
74 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
77 .IF
"$(EXTRA_CFLAGS)"!=""
78 CPP
:=gcc
-E
$(EXTRA_CFLAGS
)
79 CXX
:=g
++ $(EXTRA_CFLAGS
)
80 CC
:=gcc
$(EXTRA_CFLAGS
)
81 MACOS_SDK_DIR
*=$(MACDEVSDK
)
82 .EXPORT
: CPP MACOS_SDK_DIR
83 .ENDIF
# "$(EXTRA_CFLAGS)"!=""
84 .ENDIF
# "$(OS)"=="MACOSX"
86 OUT2LIB
=dist$/out
$/lib
$/*$(DLLPOST
)
88 BUILD_DIR
=security
$/nss
89 BUILD_ACTION
= $(GNUMAKE
) nss_build_all
90 #See #i105566# && moz#513024#
92 BUILD_ACTION
+=FREEBL_NO_DEPEND
=1
95 .ENDIF
# "$(GUI)"=="UNX"
102 PATCH_FILES
+=nss.patch.mingw
104 moz_build
:=$(shell cygpath
-p
$(MOZILLABUILD
))
105 PATH
!:=$(moz_build
)/bin
:$(PATH
)
109 .IF
"$(MINGW_SHARED_GCCLIB)"=="YES"
110 nss_CC
+=-shared-libgcc
111 nss_CXX
+=-shared-libgcc
115 .IF
"$(MINGW_SHARED_GXXLIB)"=="YES"
120 BUILD_DIR
=security
$/nss
121 BUILD_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
124 dist$/out
$/lib
$/libnspr4.a \
125 dist$/out
$/lib
$/libnss3.a \
126 dist$/out
$/lib
$/libnssdbm3.a \
127 dist$/out
$/lib
$/libnssutil3.a \
128 dist$/out
$/lib
$/libplc4.a \
129 dist$/out
$/lib
$/libplds4.a \
130 dist$/out
$/lib
$/libsmime3.a \
131 dist$/out
$/lib
$/libsoftokn3.a \
132 dist$/out
$/lib
$/libsqlite3.a \
133 dist$/out
$/lib
$/libssl3.a
135 .ELSE
# "$(COM)"=="GCC"
137 .EXPORT
: MOZ_MSVCVERSION
138 moz_build
:=$(shell cygpath
-p
$(MOZILLABUILD
))
139 PATH
!:=$(moz_build
)/msys
/bin
:$(moz_build
)/moztools
/bin
:$(PATH
)
142 #Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
143 #become libnspr4.dll, libplc4.dll, libplds4.dll
144 #WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
149 # make use of stlport headerfiles
152 #To build nss one has to call "make nss_build_all" in
153 #mozilla/security/nss
154 NSS_BUILD_DIR
= $(subst,\
,/ $(PWD
)/$(MISC
)/build
/mozilla
/security
/nss
)
155 BUILD_ACTION
= $(subst,/,$/ $(MOZILLABUILD
)/msys
/bin
/bash
) -i \
156 -c
"cd $(NSS_BUILD_DIR) && make nss_build_all"
159 dist$/out
$/lib
$/nspr4.lib \
160 dist$/out
$/lib
$/nss3.lib \
161 dist$/out
$/lib
$/nssdbm3.lib \
162 dist$/out
$/lib
$/nssutil3.lib \
163 dist$/out
$/lib
$/plc4.lib \
164 dist$/out
$/lib
$/plds4.lib \
165 dist$/out
$/lib
$/smime3.lib \
166 dist$/out
$/lib
$/softokn3.lib \
167 dist$/out
$/lib
$/sqlite3.lib \
168 dist$/out
$/lib
$/ssl3.lib
170 .ENDIF
# "$(COM)"=="GCC"
172 OUT2BIN
=dist$/out
$/lib
$/*$(DLLPOST
)
173 .ENDIF
# "$(GUI)"=="WNT"
176 OUTDIR2INC
=dist$/public
$/nss
dist$/out
$/include
178 # --- Targets ------------------------------------------------------
180 .INCLUDE
: set_ext.mk