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 .IF
"$(USE_SYSTEM_STL)"=="YES"
39 .IF
"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
40 # System STL when building with SunStudio is just a version of STLport
41 # which comes with the compiler
44 .ELSE
#"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
46 # If you choose to build without stlport, some headers will be used to bring the
47 # sgi extensions into the std namespace:
48 $(INCCOM
)$/stlport
$/functional \
49 $(INCCOM
)$/stlport
$/hash_map \
50 $(INCCOM
)$/stlport
$/hash_set \
51 $(INCCOM
)$/stlport
$/numeric \
52 $(INCCOM
)$/stlport
$/slist \
53 $(INCCOM
)$/stlport
$/rope \
54 $(INCCOM
)$/stlport
$/vector
: systemstl
$/$$(@
:f
)
57 .ENDIF
#"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
59 .ELSE
# "$(USE_SYSTEM_STL)"
61 # --- Files --------------------------------------------------------
63 .IF
"$(COMID)"=="gcc3"
64 TARFILE_NAME
=STLport-4.5
65 TARFILE_MD5
=18f577b374d60b3c760a3a3350407632
66 PATCH_FILES
=STLport-4.5.patch STLport-4.5
-gcc43_warnings.patch
68 .IF
"$(CCNUMVER)"<="001300000000"
69 TARFILE_NAME
=STLport-4.0
70 TARFILE_MD5
=c441926f3a552ed3e5b274b62e86af16
71 PATCH_FILES
=STLport-4.0.patch
73 TARFILE_NAME
=STLport-4.5
-0119
74 TARFILE_MD5
=7376930b0d3f3d77a685d94c4a3acda8
75 PATCH_FILES
=STLport-4.5
-0119.patch
78 TARFILE_NAME
=STLport-4.0
79 TARFILE_MD5
=c441926f3a552ed3e5b274b62e86af16
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 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 \
106 src
$/gcc-3.0
-os2.mak src
$/gcc-3.0
-os2.def src
$/common_macros_os2.mak
109 CONFIGURE_ACTION
=none
116 .IF
"$(CCNUMVER)"<="001400000000"
117 BUILD_FLAGS
=-f vc7.mak EXFLAGS
="/EHsc"
118 .ELSE
# "$(CCNUMVER)"<="001400000000"
119 BUILD_FLAGS
=-f vc7.mak EXFLAGS
="/EHa /Zc:wchar_t-" CCNUMVER
=$(CCNUMVER
)
120 .ENDIF
# "$(CCNUMVER)"<="001400000000"
124 .IF
"$(COMID)"=="gcc3"
125 # FreeBSD needs a special makefile
126 .IF
"$(OS)"=="FREEBSD"
127 BUILD_FLAGS
=-f gcc-3.0
-freebsd.mak
129 BUILD_FLAGS
=-f gcc-3.0
-os2.mak
130 .ELIF
"$(GUI)"=="WNT"
131 BUILD_FLAGS
=-f gcc-3.0
-mingw.mak
133 BUILD_FLAGS
=-f gcc-3.0.mak
135 .ELSE
# "$(COMID)"=="gcc3"
136 .IF
"$(OS)"=="FREEBSD"
137 BUILD_FLAGS
=-f gcc-freebsd.mak
139 BUILD_FLAGS
=-f gcc.mak
141 .ENDIF
# "$(COMID)"=="gcc3"
142 BUILD_ACTION
=$(GNUMAKE
)
144 BUILD_FLAGS
+= -j
$(MAXPROCESS
)
146 .IF
"$(HAVE_LD_HASH_STYLE)" == "TRUE"
147 CXX
+= -Wl
,--hash-style
=both
150 .IF
"$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE"
151 CXX
+= -Wl
,-Bsymbolic-functions
-Wl
,--dynamic-list-cpp-new
-Wl
,--dynamic-list-cpp-typeinfo
156 .IF
"$(CCNUMVER)">="00050008"
157 BUILD_FLAGS
=-f sunpro11.mak
158 .ELIF
"$(CCNUMVER)">="00050005"
159 BUILD_FLAGS
=-f sunpro8.mak
161 BUILD_FLAGS
=-f sunpro6.mak
162 .ENDIF
# "$(CCNUMVER)">="00050008"
165 stlport
$/SC5
$/*.SUNWCCh
189 .ENDIF
# "$(COM)"=="GCC"
191 .ELIF
"$(GUI)"=="OS2"
196 .ELSE
# "$(GUI)"=="WNT"
201 .ENDIF
# "$(GUI)"=="WNT"
203 # --- Targets ------------------------------------------------------
205 .IF
"$(STLPORT4)"!="NO_STLPORT4"
207 @echo
" An already available installation of STLport has been chosen in the configure process."
208 @echo
" Therefore the version provided here does not need to be built in addition."
209 .ELIF
"$(OS)"=="MACOSX"
211 @echo
'--with-stlport=yes is not supported on Mac OS X'
215 .INCLUDE
: set_ext.mk
221 .IF
"$(CCNUMVER)"<="001300000000"
223 $(MISC
)$/$(TARFILE_ROOTDIR
) : avoid_win32_patches
224 avoid_win32_patches
:
226 @echo ERROR
! this module can
't use automated patch creation
231 $(PACKAGE_DIR)$/so_custom_patch : $(PACKAGE_DIR)$/$(PATCH_FLAG_FILE)
232 win32_custom.bat $(PACKAGE_DIR) $(BACK_PATH) && $(TOUCH) $@
234 $(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)$/so_custom_patch
236 .IF "$(USE_NEW_SDK)"!=""
237 $(PACKAGE_DIR)$/win32_sdk_patch : $(PACKAGE_DIR)$/$(PATCH_FLAG_FILE)
238 win32_sdk.bat $(PACKAGE_DIR) $(BACK_PATH) && $(TOUCH) $@
240 $(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE) : $(PACKAGE_DIR)$/win32_sdk_patch
241 .ENDIF # "$(USE_NEW_SDK)"!=""
242 .ENDIF # COMVER<=001300000000
243 .ENDIF "$(COM)"=="GCC"
244 .ENDIF # "$(GUI)"=="WNT"
246 .ENDIF # "$(USE_SYSTEM_STL)"