OOO330
[LibreOffice.git] / stlport / makefile.mk
blob907c0935cbe846e4a3dc09c4d54dbb5469d11038
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
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 #*************************************************************************
28 PRJ=.
30 PRJNAME=so_stlport
31 TARGET=so_stlport
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
42 all:
43 @echo "Nothing to do"
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)
55 $(MKDIRHIER) $(@:d)
56 $(COPY) $< $@
57 .ENDIF #"$(OS)"=="SOLARIS" && "$(COM)"!="GCC"
59 .ELSE # "$(USE_SYSTEM_STL)"
61 # --- Files --------------------------------------------------------
62 .EXPORT : CC CXX
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
67 .ELIF "$(GUI)"=="WNT"
68 .IF "$(CCNUMVER)"<="001300000000"
69 TARFILE_NAME=STLport-4.0
70 TARFILE_MD5=c441926f3a552ed3e5b274b62e86af16
71 PATCH_FILES=STLport-4.0.patch
72 .ELSE
73 TARFILE_NAME=STLport-4.5-0119
74 TARFILE_MD5=7376930b0d3f3d77a685d94c4a3acda8
75 PATCH_FILES=STLport-4.5-0119.patch
76 .ENDIF
77 .ELSE
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
102 # stl/_epilog.h.)
103 .ENDIF
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
110 CONFIGURE_FLAGS=
112 BUILD_DIR=src
114 .IF "$(COM)"=="MSC"
115 BUILD_ACTION=nmake
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"
121 .ENDIF
123 .IF "$(COM)"=="GCC"
124 .IF "$(COMID)"=="gcc3"
125 # FreeBSD needs a special makefile
126 .IF "$(OS)"=="FREEBSD"
127 BUILD_FLAGS=-f gcc-3.0-freebsd.mak
128 .ELIF "$(OS)"=="OS2"
129 BUILD_FLAGS=-f gcc-3.0-os2.mak
130 .ELIF "$(GUI)"=="WNT"
131 BUILD_FLAGS=-f gcc-3.0-mingw.mak
132 .ELSE
133 BUILD_FLAGS=-f gcc-3.0.mak
134 .ENDIF
135 .ELSE # "$(COMID)"=="gcc3"
136 .IF "$(OS)"=="FREEBSD"
137 BUILD_FLAGS=-f gcc-freebsd.mak
138 .ELSE
139 BUILD_FLAGS=-f gcc.mak
140 .ENDIF
141 .ENDIF # "$(COMID)"=="gcc3"
142 BUILD_ACTION=$(GNUMAKE)
143 # build in parallel
144 BUILD_FLAGS+= -j$(MAXPROCESS)
145 .ENDIF
146 .IF "$(HAVE_LD_HASH_STYLE)" == "TRUE"
147 CXX+= -Wl,--hash-style=both
148 .ENDIF
150 .IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE"
151 CXX+= -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo
152 .ENDIF
154 .IF "$(COM)"=="C52"
155 BUILD_ACTION=make
156 .IF "$(CCNUMVER)">="00050008"
157 BUILD_FLAGS=-f sunpro11.mak
158 .ELIF "$(CCNUMVER)">="00050005"
159 BUILD_FLAGS=-f sunpro8.mak
160 .ELSE
161 BUILD_FLAGS=-f sunpro6.mak
162 .ENDIF # "$(CCNUMVER)">="00050008"
164 OUT2INC= \
165 stlport$/SC5$/*.SUNWCCh
166 .ENDIF
168 OUTDIR2INC= \
169 stlport
171 .IF "$(GUI)"=="WNT"
172 .IF "$(COM)"=="GCC"
174 OUT2LIB= \
175 lib$/lib*_static.a
177 OUT2BIN= \
178 lib$/*.dll
180 .ELSE
182 OUT2LIB= \
183 lib$/*.lib
185 OUT2BIN= \
186 lib$/*.dll \
187 lib$/*.pdb
189 .ENDIF # "$(COM)"=="GCC"
191 .ELIF "$(GUI)"=="OS2"
193 OUT2LIB= lib$/*.lib
194 OUT2BIN= lib$/*.dll
196 .ELSE # "$(GUI)"=="WNT"
198 OUT2LIB= \
199 lib$/lib*
201 .ENDIF # "$(GUI)"=="WNT"
203 # --- Targets ------------------------------------------------------
205 .IF "$(STLPORT4)"!="NO_STLPORT4"
206 all :
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"
210 all:
211 @echo '--with-stlport=yes is not supported on Mac OS X'
212 false
213 .ENDIF
215 .INCLUDE : set_ext.mk
216 .INCLUDE : target.mk
217 .INCLUDE : tg_ext.mk
219 .IF "$(GUI)"=="WNT"
220 .IF "$(COM)"!="GCC"
221 .IF "$(CCNUMVER)"<="001300000000"
223 $(MISC)$/$(TARFILE_ROOTDIR) : avoid_win32_patches
224 avoid_win32_patches :
225 @$(ECHONL)
226 @echo ERROR! this module can't use automated patch creation
227 @echo on windows.
228 @$(ECHONL)
229 force_dmake_to_error
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)"