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 $
11 # $Revision: 1.45.2.1 $
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 .IF
"$(USE_SYSTEM_STL)"=="YES"
43 .IF
"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
44 # System STL when building with SunStudio is just a version of STLport
45 # which comes with the compiler
48 .ELSE
#"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
50 # If you choose to build without stlport, some headers will be used to bring the
51 # sgi extensions into the std namespace:
52 $(INCCOM
)$/stlport
$/functional \
53 $(INCCOM
)$/stlport
$/hash_map \
54 $(INCCOM
)$/stlport
$/hash_set \
55 $(INCCOM
)$/stlport
$/numeric \
56 $(INCCOM
)$/stlport
$/slist \
57 $(INCCOM
)$/stlport
$/rope \
58 $(INCCOM
)$/stlport
$/vector
: systemstl
$/$$(@
:f
)
61 .ENDIF
#"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
63 .ELSE
# "$(USE_SYSTEM_STL)"
65 # --- Files --------------------------------------------------------
67 .IF
"$(COMID)"=="gcc3"
68 TARFILE_NAME
=STLport-4.5
69 PATCH_FILES
=STLport-4.5.patch STLport-4.5
-gcc43_warnings.patch
71 .IF
"$(CCNUMVER)"<="001300000000"
72 TARFILE_NAME
=STLport-4.0
73 PATCH_FILES
=STLport-4.0.patch
75 TARFILE_NAME
=STLport-4.5
-0119
76 PATCH_FILES
=STLport-4.5
-0119.patch
79 TARFILE_NAME
=STLport-4.0
80 PATCH_FILES
=STLport-4.0.patch STLport-4.0
-sunstudio12u1.patch
81 # To disable warnings from within STLport headers on unxsoli4 and
82 # unxsols4, STLport-4.0.patch had to be extended mechanically by
84 # cd unxsol.../misc/build/STLport-4.0/stlport && \
85 # find . -type f -exec sed -i \
86 # -e 's/^\([ \t]*__STL_BEGIN_NAMESPACE[ \t]*\)$/#if defined \
87 # __SUNPRO_CC\n#pragma disable_warn\n#endif\n&/' \
88 # -e 's/^\([ \t]*__STL_END_NAMESPACE[ \t]*\)$/&\n#if defined \
89 # __SUNPRO_CC\n#pragma enable_warn\n#endif/' {} \;
91 # (causing lots of files to become modified) and by additionally
92 # changing unxsol.../misc/build/STLport-4.0/stlport/math.h,
93 # unxsol.../misc/build/STLport-4.0/stlport/stl/_config.h,
94 # unxsol.../misc/build/STLport-4.0/stlport/stl/_list.h, and
95 # unxsol.../misc/build/STLport-4.0/stlport/stl/type_traits.h manually.
96 # (Obviously due to the way the C++ compiler generates code for
97 # instantiations of inline function templates from STLport headers, it
98 # does not work to simply add "#pragma disable_warn" to stl/_prolog.h
99 # and "#pragma enable_warn" to stl/_epilog.h, as seemingly some internal
100 # STLport headers are read in by the compiler only at the end of a
101 # compilation unit, outside the scope of stl/_prolog.h and
105 .IF
"$(USE_SHELL)"=="4nt"
107 .ENDIF
# "$(USE_SHELL)"=="4nt"
109 ADDITIONAL_FILES
=src
$/gcc-3.0.mak src
$/gcc-3.0
-freebsd.mak src
$/sunpro8.mak src
$/sunpro11.mak src
$/gcc-3.0
-mingw.mak \
110 src
$/gcc-3.0
-os2.mak src
$/gcc-3.0
-os2.def src
$/common_macros_os2.mak
113 CONFIGURE_ACTION
=none
120 .IF
"$(CCNUMVER)"<="001400000000"
121 BUILD_FLAGS
=-f vc7.mak EXFLAGS
="/EHsc"
122 .ELSE
# "$(CCNUMVER)"<="001400000000"
123 BUILD_FLAGS
=-f vc7.mak EXFLAGS
="/EHa /Zc:wchar_t-" CCNUMVER
=$(CCNUMVER
)
124 .ENDIF
# "$(CCNUMVER)"<="001400000000"
128 .IF
"$(COMID)"=="gcc3"
129 # FreeBSD needs a special makefile
130 .IF
"$(OS)"=="FREEBSD"
131 BUILD_FLAGS
=-f gcc-3.0
-freebsd.mak
133 BUILD_FLAGS
=-f gcc-3.0
-os2.mak
134 .ELIF
"$(GUI)"=="WNT"
135 BUILD_FLAGS
=-f gcc-3.0
-mingw.mak
137 BUILD_FLAGS
=-f gcc-3.0.mak
139 .ELSE
# "$(COMID)"=="gcc3"
140 .IF
"$(OS)"=="FREEBSD"
141 BUILD_FLAGS
=-f gcc-freebsd.mak
143 BUILD_FLAGS
=-f gcc.mak
145 .ENDIF
# "$(COMID)"=="gcc3"
146 BUILD_ACTION
=$(GNUMAKE
)
148 BUILD_FLAGS
+= -j
$(MAXPROCESS
)
150 .IF
"$(HAVE_LD_HASH_STYLE)" == "TRUE"
151 CXX
+= -Wl
,--hash-style
=$(WITH_LINKER_HASH_STYLE
)
154 .IF
"$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE"
155 CXX
+= -Wl
,-Bsymbolic-functions
-Wl
,--dynamic-list-cpp-new
-Wl
,--dynamic-list-cpp-typeinfo
160 .IF
"$(CCNUMVER)">="00050008"
161 BUILD_FLAGS
=-f sunpro11.mak
162 .ELIF
"$(CCNUMVER)">="00050005"
163 BUILD_FLAGS
=-f sunpro8.mak
165 BUILD_FLAGS
=-f sunpro6.mak
166 .ENDIF
# "$(CCNUMVER)">="00050008"
169 stlport
$/SC5
$/*.SUNWCCh
173 TARFILE_NAME
=STLport-4.5
174 PATCH_FILES
=STLport-4.5.patch
176 BUILD_FLAGS
=-f gcc-3.0.mak
177 BUILD_FLAGS
+= -j
$(MAXPROCESS
)
201 .ENDIF
# "$(COM)"=="GCC"
203 .ELIF
"$(GUI)"=="OS2"
208 .ELSE
# "$(GUI)"=="WNT"
213 .ENDIF
# "$(GUI)"=="WNT"
215 # --- Targets ------------------------------------------------------
217 .IF
"$(STLPORT4)"!="NO_STLPORT4"
219 @echo
" An already available installation of STLport has been chosen in the configure process."
220 @echo
" Therefore the version provided here does not need to be built in addition."
221 .ELIF
"$(OS)"=="MACOSX"
223 @echo
'--with-stlport=yes is not supported on Mac OS X'
227 .INCLUDE
: set_ext.mk
233 .IF
"$(CCNUMVER)"<="001300000000"
235 $(MISC
)$/$(TARFILE_ROOTDIR
) : avoid_win32_patches
236 avoid_win32_patches
:
238 @echo ERROR
! this module can
't use automated patch creation
243 $(PACKAGE_DIR)$/so_custom_patch : $(PACKAGE_DIR)$/$(PATCH_FLAG_FILE)
244 .IF "$(USE_SHELL)"=="4nt"
245 win32_custom.bat $(PACKAGE_DIR) $(BACK_PATH) && $(TOUCH) $@
246 .ELSE # "$(USE_SHELL)"=="4nt"
247 win32_custom.sh $(PACKAGE_DIR) $(BACK_PATH) && $(TOUCH) $@
248 .ENDIF # "$(USE_SHELL)"=="4nt"
250 $(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)$/so_custom_patch
252 .IF "$(USE_NEW_SDK)"!=""
253 $(PACKAGE_DIR)$/win32_sdk_patch : $(PACKAGE_DIR)$/$(PATCH_FLAG_FILE)
254 .IF "$(USE_SHELL)"=="4nt"
255 win32_sdk.bat $(PACKAGE_DIR) $(BACK_PATH) && $(TOUCH) $@
256 .ELSE # "$(USE_SHELL)"=="4nt"
257 win32_sdk.sh $(PACKAGE_DIR) $(BACK_PATH) && $(TOUCH) $@
258 .ENDIF # "$(USE_SHELL)"=="4nt"
260 $(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)$/win32_sdk_patch
261 .ENDIF # "$(USE_NEW_SDK)"!=""
262 .ENDIF # COMVER<=001300000000
263 .ENDIF "$(COM)"=="GCC"
264 .ENDIF # "$(GUI)"=="WNT"
266 .ENDIF # "$(USE_SYSTEM_STL)"