1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24PRJ=. 25 26PRJNAME=so_stlport 27TARGET=so_stlport 28 29# --- Settings ----------------------------------------------------- 30 31.INCLUDE : settings.mk 32 33.IF "$(USE_SYSTEM_STL)"=="YES" 34 35.IF "$(OS)"=="SOLARIS" && "$(COM)"!="GCC" 36# System STL when building with SunStudio is just a version of STLport 37# which comes with the compiler 38all: 39 @echo "Nothing to do" 40.ELSE #"$(OS)"=="SOLARIS" && "$(COM)"!="GCC" 41# 42# If you choose to build without stlport, some headers will be used to bring the 43# sgi extensions into the std namespace: 44$(INCCOM)$/stlport$/functional \ 45$(INCCOM)$/stlport$/hash_map \ 46$(INCCOM)$/stlport$/hash_set \ 47$(INCCOM)$/stlport$/numeric \ 48$(INCCOM)$/stlport$/slist \ 49$(INCCOM)$/stlport$/rope \ 50$(INCCOM)$/stlport$/vector: systemstl$/$$(@:f) 51 $(MKDIRHIER) $(@:d) 52 $(COPY) $< $@ 53.ENDIF #"$(OS)"=="SOLARIS" && "$(COM)"!="GCC" 54 55.ELSE # "$(USE_SYSTEM_STL)" 56 57# --- Files -------------------------------------------------------- 58.EXPORT : CC CXX 59.IF "$(COMID)"=="gcc3" 60 TARFILE_NAME=STLport-4.5 61 TARFILE_MD5=18f577b374d60b3c760a3a3350407632 62 PATCH_FILES=STLport-4.5.patch STLport-4.5-gcc43_warnings.patch 63.ELIF "$(GUI)"=="WNT" 64 TARFILE_NAME=STLport-4.5-0119 65 TARFILE_MD5=7376930b0d3f3d77a685d94c4a3acda8 66 PATCH_FILES=STLport-4.5-0119.patch 67.ELSE 68 TARFILE_NAME=STLport-4.0 69 TARFILE_MD5=c441926f3a552ed3e5b274b62e86af16 70 PATCH_FILES=STLport-4.0.patch STLport-4.0-sunstudio12u1.patch 71 # To disable warnings from within STLport headers on unxsoli4 and 72 # unxsols4, STLport-4.0.patch had to be extended mechanically by 73 # 74 # cd unxsol.../misc/build/STLport-4.0/stlport && \ 75 # find . -type f -exec sed -i \ 76 # -e 's/^\([ \t]*__STL_BEGIN_NAMESPACE[ \t]*\)$/#if defined \ 77 # __SUNPRO_CC\n#pragma disable_warn\n#endif\n&/' \ 78 # -e 's/^\([ \t]*__STL_END_NAMESPACE[ \t]*\)$/&\n#if defined \ 79 # __SUNPRO_CC\n#pragma enable_warn\n#endif/' {} \; 80 # 81 # (causing lots of files to become modified) and by additionally 82 # changing unxsol.../misc/build/STLport-4.0/stlport/math.h, 83 # unxsol.../misc/build/STLport-4.0/stlport/stl/_config.h, 84 # unxsol.../misc/build/STLport-4.0/stlport/stl/_list.h, and 85 # unxsol.../misc/build/STLport-4.0/stlport/stl/type_traits.h manually. 86 # (Obviously due to the way the C++ compiler generates code for 87 # instantiations of inline function templates from STLport headers, it 88 # does not work to simply add "#pragma disable_warn" to stl/_prolog.h 89 # and "#pragma enable_warn" to stl/_epilog.h, as seemingly some internal 90 # STLport headers are read in by the compiler only at the end of a 91 # compilation unit, outside the scope of stl/_prolog.h and 92 # stl/_epilog.h.) 93.ENDIF 94 95ADDITIONAL_FILES=src$/gcc-3.0.mak src$/gcc-3.0-freebsd.mak src$/sunpro8.mak src$/sunpro11.mak src$/gcc-3.0-mingw.mak \ 96 src$/gcc-3.0-os2.mak src$/gcc-3.0-os2.def src$/common_macros_os2.mak 97 98 99CONFIGURE_ACTION=none 100CONFIGURE_FLAGS= 101 102BUILD_DIR=src 103 104.IF "$(COM)"=="MSC" 105BUILD_ACTION=nmake 106BUILD_FLAGS=-f vc7.mak EXFLAGS="/EHa /Zc:wchar_t-" CCNUMVER=$(CCNUMVER) 107.ENDIF 108 109.IF "$(COM)"=="GCC" 110 .IF "$(COMID)"=="gcc3" 111 # FreeBSD needs a special makefile 112 .IF "$(OS)"=="FREEBSD" 113 BUILD_FLAGS=-f gcc-3.0-freebsd.mak 114 .ELIF "$(OS)"=="OS2" 115 BUILD_FLAGS=-f gcc-3.0-os2.mak 116 .ELIF "$(GUI)"=="WNT" 117 BUILD_FLAGS=-f gcc-3.0-mingw.mak 118 .ELSE 119 BUILD_FLAGS=-f gcc-3.0.mak 120 .ENDIF 121 .ELSE # "$(COMID)"=="gcc3" 122 .IF "$(OS)"=="FREEBSD" 123 BUILD_FLAGS=-f gcc-freebsd.mak 124 .ELSE 125 BUILD_FLAGS=-f gcc.mak 126 .ENDIF 127 .ENDIF # "$(COMID)"=="gcc3" 128 BUILD_ACTION=$(GNUMAKE) 129 # build in parallel 130 BUILD_FLAGS+= -j$(MAXPROCESS) 131.ENDIF 132.IF "$(HAVE_LD_HASH_STYLE)" == "TRUE" 133CXX+= -Wl,--hash-style=both 134.ENDIF 135 136.IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE" 137CXX+= -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo 138.ENDIF 139 140.IF "$(COM)"=="C52" 141BUILD_ACTION=make 142.IF "$(CCNUMVER)">="00050008" 143BUILD_FLAGS=-f sunpro11.mak 144.ELIF "$(CCNUMVER)">="00050005" 145BUILD_FLAGS=-f sunpro8.mak 146.ELSE 147BUILD_FLAGS=-f sunpro6.mak 148.ENDIF # "$(CCNUMVER)">="00050008" 149 150OUT2INC= \ 151 stlport$/SC5$/*.SUNWCCh 152.ENDIF 153 154OUTDIR2INC= \ 155 stlport 156 157.IF "$(GUI)"=="WNT" 158.IF "$(COM)"=="GCC" 159 160OUT2LIB= \ 161 lib$/lib*_static.a 162 163OUT2BIN= \ 164 lib$/*.dll 165 166.ELSE 167 168OUT2LIB= \ 169 lib$/*.lib 170 171OUT2BIN= \ 172 lib$/*.dll \ 173 lib$/*.pdb 174 175.ENDIF # "$(COM)"=="GCC" 176 177.ELIF "$(GUI)"=="OS2" 178 179OUT2LIB= lib$/*.lib 180OUT2BIN= lib$/*.dll 181 182.ELSE # "$(GUI)"=="WNT" 183 184OUT2LIB= \ 185 lib$/lib* 186 187.ENDIF # "$(GUI)"=="WNT" 188 189# --- Targets ------------------------------------------------------ 190 191.IF "$(STLPORT4)"!="NO_STLPORT4" 192all : 193 @echo " An already available installation of STLport has been chosen in the configure process." 194 @echo " Therefore the version provided here does not need to be built in addition." 195.ELIF "$(OS)"=="MACOSX" 196all: 197 @echo '--with-stlport=yes is not supported on Mac OS X' 198 false 199.ENDIF 200 201.INCLUDE : set_ext.mk 202.INCLUDE : target.mk 203.INCLUDE : tg_ext.mk 204 205.ENDIF # "$(USE_SYSTEM_STL)" 206