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$/list \ 50$(INCCOM)$/stlport$/map \ 51$(INCCOM)$/stlport$/set \ 52$(INCCOM)$/stlport$/vector: systemstl$/$$(@:f) 53 $(MKDIRHIER) $(@:d) 54 $(COPY) $< $@ 55.ENDIF #"$(OS)"=="SOLARIS" && "$(COM)"!="GCC" 56 57.ELSE # "$(USE_SYSTEM_STL)" 58 59# --- Files -------------------------------------------------------- 60.EXPORT : CC CXX 61.IF "$(COMID)"=="gcc3" 62 TARFILE_NAME=STLport-4.5 63 TARFILE_MD5=18f577b374d60b3c760a3a3350407632 64 PATCH_FILES=STLport-4.5.patch STLport-4.5-gcc43_warnings.patch 65.ELIF "$(GUI)"=="WNT" 66 TARFILE_NAME=STLport-4.5-0119 67 TARFILE_MD5=7376930b0d3f3d77a685d94c4a3acda8 68 PATCH_FILES=STLport-4.5-0119.patch 69.ELSE 70 TARFILE_NAME=STLport-4.0 71 TARFILE_MD5=c441926f3a552ed3e5b274b62e86af16 72 PATCH_FILES=STLport-4.0.patch STLport-4.0-sunstudio12u1.patch 73 # To disable warnings from within STLport headers on unxsoli4 and 74 # unxsols4, STLport-4.0.patch had to be extended mechanically by 75 # 76 # cd unxsol.../misc/build/STLport-4.0/stlport && \ 77 # find . -type f -exec sed -i \ 78 # -e 's/^\([ \t]*__STL_BEGIN_NAMESPACE[ \t]*\)$/#if defined \ 79 # __SUNPRO_CC\n#pragma disable_warn\n#endif\n&/' \ 80 # -e 's/^\([ \t]*__STL_END_NAMESPACE[ \t]*\)$/&\n#if defined \ 81 # __SUNPRO_CC\n#pragma enable_warn\n#endif/' {} \; 82 # 83 # (causing lots of files to become modified) and by additionally 84 # changing unxsol.../misc/build/STLport-4.0/stlport/math.h, 85 # unxsol.../misc/build/STLport-4.0/stlport/stl/_config.h, 86 # unxsol.../misc/build/STLport-4.0/stlport/stl/_list.h, and 87 # unxsol.../misc/build/STLport-4.0/stlport/stl/type_traits.h manually. 88 # (Obviously due to the way the C++ compiler generates code for 89 # instantiations of inline function templates from STLport headers, it 90 # does not work to simply add "#pragma disable_warn" to stl/_prolog.h 91 # and "#pragma enable_warn" to stl/_epilog.h, as seemingly some internal 92 # STLport headers are read in by the compiler only at the end of a 93 # compilation unit, outside the scope of stl/_prolog.h and 94 # stl/_epilog.h.) 95.ENDIF 96 97ADDITIONAL_FILES=src$/gcc-3.0.mak src$/gcc-3.0-freebsd.mak src$/sunpro8.mak src$/sunpro11.mak src$/gcc-3.0-mingw.mak \ 98 src$/gcc-3.0-os2.mak src$/gcc-3.0-os2.def src$/common_macros_os2.mak 99 100 101CONFIGURE_ACTION=none 102CONFIGURE_FLAGS= 103 104BUILD_DIR=src 105 106.IF "$(COM)"=="MSC" 107BUILD_ACTION=nmake 108BUILD_FLAGS=-f vc7.mak EXFLAGS="/EHa /Zc:wchar_t-" CCNUMVER=$(CCNUMVER) 109.ENDIF 110 111.IF "$(COM)"=="GCC" 112 .IF "$(COMID)"=="gcc3" 113 # FreeBSD needs a special makefile 114 .IF "$(OS)"=="FREEBSD" 115 BUILD_FLAGS=-f gcc-3.0-freebsd.mak 116 .ELIF "$(OS)"=="OS2" 117 BUILD_FLAGS=-f gcc-3.0-os2.mak 118 .ELIF "$(GUI)"=="WNT" 119 BUILD_FLAGS=-f gcc-3.0-mingw.mak 120 .ELSE 121 BUILD_FLAGS=-f gcc-3.0.mak 122 .ENDIF 123 .ELSE # "$(COMID)"=="gcc3" 124 .IF "$(OS)"=="FREEBSD" 125 BUILD_FLAGS=-f gcc-freebsd.mak 126 .ELSE 127 BUILD_FLAGS=-f gcc.mak 128 .ENDIF 129 .ENDIF # "$(COMID)"=="gcc3" 130 BUILD_ACTION=$(GNUMAKE) 131 # build in parallel 132 BUILD_FLAGS+= -j$(MAXPROCESS) 133.ENDIF 134.IF "$(HAVE_LD_HASH_STYLE)" == "TRUE" 135CXX+= -Wl,--hash-style=both 136.ENDIF 137 138.IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE" 139CXX+= -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo 140.ENDIF 141 142.IF "$(COM)"=="C52" 143BUILD_ACTION=make 144.IF "$(CCNUMVER)">="00050008" 145BUILD_FLAGS=-f sunpro11.mak 146.ELIF "$(CCNUMVER)">="00050005" 147BUILD_FLAGS=-f sunpro8.mak 148.ELSE 149BUILD_FLAGS=-f sunpro6.mak 150.ENDIF # "$(CCNUMVER)">="00050008" 151 152OUT2INC= \ 153 stlport$/SC5$/*.SUNWCCh 154.ENDIF 155 156OUTDIR2INC= \ 157 stlport 158 159.IF "$(GUI)"=="WNT" 160.IF "$(COM)"=="GCC" 161 162OUT2LIB= \ 163 lib$/lib*_static.a 164 165OUT2BIN= \ 166 lib$/*.dll 167 168.ELSE 169 170OUT2LIB= \ 171 lib$/*.lib 172 173OUT2BIN= \ 174 lib$/*.dll \ 175 lib$/*.pdb 176 177.ENDIF # "$(COM)"=="GCC" 178 179.ELIF "$(GUI)"=="OS2" 180 181OUT2LIB= lib$/*.lib 182OUT2BIN= lib$/*.dll 183 184.ELSE # "$(GUI)"=="WNT" 185 186OUT2LIB= \ 187 lib$/lib* 188 189.ENDIF # "$(GUI)"=="WNT" 190 191# --- Targets ------------------------------------------------------ 192 193.IF "$(STLPORT4)"!="NO_STLPORT4" 194all : 195 @echo " An already available installation of STLport has been chosen in the configure process." 196 @echo " Therefore the version provided here does not need to be built in addition." 197.ELIF "$(OS)"=="MACOSX" 198all: 199 @echo '--with-stlport=yes is not supported on Mac OS X' 200 false 201.ENDIF 202 203.INCLUDE : set_ext.mk 204.INCLUDE : target.mk 205.INCLUDE : tg_ext.mk 206 207.ENDIF # "$(USE_SYSTEM_STL)" 208