update dev300-m58
[ooovba.git] / stlport / makefile.mk
bloba18d3f8fbc4732cafb41754d11dc8a168ed1ffe1
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
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 #*************************************************************************
32 PRJ=.
34 PRJNAME=so_stlport
35 TARGET=so_stlport
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
46 all:
47 @echo "Nothing to do"
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)
59 $(MKDIRHIER) $(@:d)
60 $(COPY) $< $@
61 .ENDIF #"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
63 .ELSE # "$(USE_SYSTEM_STL)"
65 # --- Files --------------------------------------------------------
66 .EXPORT : CC CXX
67 .IF "$(COMID)"=="gcc3"
68 TARFILE_NAME=STLport-4.5
69 PATCH_FILES=STLport-4.5.patch STLport-4.5-gcc43_warnings.patch
70 .ELIF "$(GUI)"=="WNT"
71 .IF "$(CCNUMVER)"<="001300000000"
72 TARFILE_NAME=STLport-4.0
73 PATCH_FILES=STLport-4.0.patch
74 .ELSE
75 TARFILE_NAME=STLport-4.5-0119
76 PATCH_FILES=STLport-4.5-0119.patch
77 .ENDIF
78 .ELSE
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
102 # stl/_epilog.h.)
103 .ENDIF
105 .IF "$(USE_SHELL)"=="4nt"
106 TAR_EXCLUDES=*/SC5/*
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
114 CONFIGURE_FLAGS=
116 BUILD_DIR=src
118 .IF "$(COM)"=="MSC"
119 BUILD_ACTION=nmake
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"
125 .ENDIF
127 .IF "$(COM)"=="GCC"
128 .IF "$(COMID)"=="gcc3"
129 # FreeBSD needs a special makefile
130 .IF "$(OS)"=="FREEBSD"
131 BUILD_FLAGS=-f gcc-3.0-freebsd.mak
132 .ELIF "$(OS)"=="OS2"
133 BUILD_FLAGS=-f gcc-3.0-os2.mak
134 .ELIF "$(GUI)"=="WNT"
135 BUILD_FLAGS=-f gcc-3.0-mingw.mak
136 .ELSE
137 BUILD_FLAGS=-f gcc-3.0.mak
138 .ENDIF
139 .ELSE # "$(COMID)"=="gcc3"
140 .IF "$(OS)"=="FREEBSD"
141 BUILD_FLAGS=-f gcc-freebsd.mak
142 .ELSE
143 BUILD_FLAGS=-f gcc.mak
144 .ENDIF
145 .ENDIF # "$(COMID)"=="gcc3"
146 BUILD_ACTION=$(GNUMAKE)
147 # build in parallel
148 BUILD_FLAGS+= -j$(MAXPROCESS)
149 .ENDIF
150 .IF "$(HAVE_LD_HASH_STYLE)" == "TRUE"
151 CXX+= -Wl,--hash-style=$(WITH_LINKER_HASH_STYLE)
152 .ENDIF
154 .IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE"
155 CXX+= -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo
156 .ENDIF
158 .IF "$(COM)"=="C52"
159 BUILD_ACTION=make
160 .IF "$(CCNUMVER)">="00050008"
161 BUILD_FLAGS=-f sunpro11.mak
162 .ELIF "$(CCNUMVER)">="00050005"
163 BUILD_FLAGS=-f sunpro8.mak
164 .ELSE
165 BUILD_FLAGS=-f sunpro6.mak
166 .ENDIF # "$(CCNUMVER)">="00050008"
168 OUT2INC= \
169 stlport$/SC5$/*.SUNWCCh
170 .ENDIF
172 .IF "$(OS)"=="IRIX"
173 TARFILE_NAME=STLport-4.5
174 PATCH_FILES=STLport-4.5.patch
175 BUILD_ACTION=gmake
176 BUILD_FLAGS=-f gcc-3.0.mak
177 BUILD_FLAGS+= -j$(MAXPROCESS)
178 .ENDIF
180 OUTDIR2INC= \
181 stlport
183 .IF "$(GUI)"=="WNT"
184 .IF "$(COM)"=="GCC"
186 OUT2LIB= \
187 lib$/lib*_static.a
189 OUT2BIN= \
190 lib$/*.dll
192 .ELSE
194 OUT2LIB= \
195 lib$/*.lib
197 OUT2BIN= \
198 lib$/*.dll \
199 lib$/*.pdb
201 .ENDIF # "$(COM)"=="GCC"
203 .ELIF "$(GUI)"=="OS2"
205 OUT2LIB= lib$/*.lib
206 OUT2BIN= lib$/*.dll
208 .ELSE # "$(GUI)"=="WNT"
210 OUT2LIB= \
211 lib$/lib*
213 .ENDIF # "$(GUI)"=="WNT"
215 # --- Targets ------------------------------------------------------
217 .IF "$(STLPORT4)"!="NO_STLPORT4"
218 all :
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"
222 all:
223 @echo '--with-stlport=yes is not supported on Mac OS X'
224 false
225 .ENDIF
227 .INCLUDE : set_ext.mk
228 .INCLUDE : target.mk
229 .INCLUDE : tg_ext.mk
231 .IF "$(GUI)"=="WNT"
232 .IF "$(COM)"!="GCC"
233 .IF "$(CCNUMVER)"<="001300000000"
235 $(MISC)$/$(TARFILE_ROOTDIR) : avoid_win32_patches
236 avoid_win32_patches :
237 @$(ECHONL)
238 @echo ERROR! this module can't use automated patch creation
239 @echo on windows.
240 @$(ECHONL)
241 force_dmake_to_error
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)"