1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: makefile.mk,v $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
37 # --- Settings -----------------------------------------------------
39 .INCLUDE
: settings.mk
41 # --- Files --------------------------------------------------------
43 .IF
"$(ENABLE_NSS_MODULE)"!="YES"
45 @echo
"NSS will not be built. ENABLE_NSS_MODULE is '$(ENABLE_NSS_MODULE)'"
48 TARFILE_NAME
=nss_3_12_3
49 TARFILE_ROOTDIR
=mozilla
50 PATCH_FILES
=nss_3_12_3.patch
60 .IF
"$(OS)$(COM)"=="LINUXGCC"
61 #LDFLAGS:=-Wl,-rpath,'$$$$ORIGIN'
65 # force 64-bit buildmode
68 .ENDIF
# "$(CPU)"=="X"
69 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
73 .IF
"$(EXTRA_CFLAGS)"!=""
74 CPP
:=gcc
-E
$(EXTRA_CFLAGS
)
75 CXX
:=g
++ $(EXTRA_CFLAGS
)
76 CC
:=gcc
$(EXTRA_CFLAGS
)
78 .ENDIF
# "$(EXTRA_CFLAGS)"!=""
79 .ENDIF
# "$(OS)"=="MACOSX"
81 OUT2LIB
=dist$/out
$/lib
$/*$(DLLPOST
)
83 BUILD_DIR
=security
$/nss
84 BUILD_ACTION
= $(GNUMAKE
) nss_build_all
86 .ENDIF
# "$(GUI)"=="UNX"
93 PATCH_FILES
+=nss_3_12_3.patch.mingw
95 moz_build
:=$(shell cygpath
-p
$(MOZILLABUILD
))
96 PATH
!:=$(moz_build
)/bin
:$(PATH
)
100 .IF
"$(MINGW_SHARED_GCCLIB)"=="YES"
101 nss_CC
+=-shared-libgcc
102 nss_CXX
+=-shared-libgcc
106 .IF
"$(MINGW_SHARED_GXXLIB)"=="YES"
111 BUILD_DIR
=security
$/nss
112 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
115 dist$/out
$/lib
$/libnspr4.a \
116 dist$/out
$/lib
$/libnss3.a \
117 dist$/out
$/lib
$/libnssdbm3.a \
118 dist$/out
$/lib
$/libnssutil3.a \
119 dist$/out
$/lib
$/libplc4.a \
120 dist$/out
$/lib
$/libplds4.a \
121 dist$/out
$/lib
$/libsmime3.a \
122 dist$/out
$/lib
$/libsoftokn3.a \
123 dist$/out
$/lib
$/libsqlite3.a \
124 dist$/out
$/lib
$/libssl3.a
126 .ELSE
# "$(COM)"=="GCC"
128 .EXPORT
: MOZ_MSVCVERSION
129 .IF
"$(USE_SHELL)"=="4nt"
130 PATH
!:=$(MOZILLABUILD
)/msys
/bin
;$(MOZILLABUILD
)/moztools
/bin
;$(PATH
)
131 .ELSE
# $(USE_SHELL)"=="4nt"
132 moz_build
:=$(shell cygpath
-p
$(MOZILLABUILD
))
133 PATH
!:=$(moz_build
)/msys
/bin
:$(moz_build
)/moztools
/bin
:$(PATH
)
134 .ENDIF
# $(USE_SHELL)"=="4nt"
137 #Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
138 #become libnspr4.dll, libplc4.dll, libplds4.dll
139 #WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
144 # make use of stlport headerfiles
147 #To build nss one has to call "make nss_build_all" in
148 #mozilla/security/nss
149 NSS_BUILD_DIR
= $(subst,\
,/ $(PWD
)/$(MISC
)/build
/mozilla
/security
/nss
)
150 BUILD_ACTION
= $(subst,/,$/ $(MOZILLABUILD
)/msys
/bin
/bash
) -i \
151 -c
"cd $(NSS_BUILD_DIR) && make nss_build_all"
154 dist$/out
$/lib
$/nspr4.lib \
155 dist$/out
$/lib
$/nss3.lib \
156 dist$/out
$/lib
$/nssdbm3.lib \
157 dist$/out
$/lib
$/nssutil3.lib \
158 dist$/out
$/lib
$/plc4.lib \
159 dist$/out
$/lib
$/plds4.lib \
160 dist$/out
$/lib
$/smime3.lib \
161 dist$/out
$/lib
$/softokn3.lib \
162 dist$/out
$/lib
$/sqlite3.lib \
163 dist$/out
$/lib
$/ssl3.lib
165 .ENDIF
# "$(COM)"=="GCC"
167 OUT2BIN
=dist$/out
$/lib
$/*$(DLLPOST
)
168 .ENDIF
# "$(GUI)"=="WNT"
171 OUTDIR2INC
=dist$/public
$/nss
dist$/out
$/include
173 # --- Targets ------------------------------------------------------
175 .INCLUDE
: set_ext.mk