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