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 24# --- OS2-Environment ---------------------------------------------- 25 26#change output dir name using the object binary format. 27#.IF "$(aout)"=="" 28#OUTFMT=omf 29#.ELSE 30#OUTFMT=aout 31#.ENDIF 32#OUTPATH+=OUTFMT 33#INPATH+=OUTFMT 34#GVERDIR+=OUTFMT 35 36# mk file for os2gcci 37ASM=as 38AFLAGS= 39 40#//YD SOLAR_JAVA=TRUE 41JAVAFLAGSDEBUG=-g 42 43# filter for supressing verbose messages from linker 44#not needed at the moment 45#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" 46 47.IF "$(ttt)"!="" 48CDEFS+=-E 49.ENDIF 50 51# _PTHREADS is needed for the stl 52CDEFS+=-DX86 -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 53 54# this is a platform with JAVA support 55.IF "$(SOLAR_JAVA)"!="" 56JAVADEF=-DSOLAR_JAVA 57.IF "$(debug)"=="" 58JAVA_RUNTIME=javai.lib 59.ELSE 60JAVA_RUNTIME=javai_g.lib 61.ENDIF 62.ENDIF 63 64# architecture dependent flags for the C and C++ compiler that can be changed by 65# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build 66ARCH_FLAGS*= 67 68# name of C++ Compiler 69CXX*=g++ 70# name of C Compiler 71CC*=gcc 72# flags for C and C++ Compiler 73CFLAGS+=-c 74# flags for the C++ Compiler 75CFLAGSCC= $(ARCH_FLAGS) 76 77.IF "$(aout)"=="" 78CFLAGS+=-Zomf 79.ENDIF 80 81# Flags for enabling exception handling 82CFLAGSEXCEPTIONS=-fexceptions 83# Flags for disabling exception handling 84CFLAGS_NO_EXCEPTIONS=-fno-exceptions 85 86CFLAGSCXX= -frtti $(ARCH_FLAGS) 87CFLAGSCXX+= -Wno-ctor-dtor-privacy -fmessage-length=0 88PICSWITCH:= 89 90# Compiler flags for compiling static object in single threaded environment with graphical user interface 91CFLAGSOBJGUIST=-Zcrtdll 92# Compiler flags for compiling static object in single threaded environment with character user interface 93CFLAGSOBJCUIST=-Zcrtdll 94# Compiler flags for compiling static object in multi threaded environment with graphical user interface 95CFLAGSOBJGUIMT=-Zcrtdll 96# Compiler flags for compiling static object in multi threaded environment with character user interface 97CFLAGSOBJCUIMT=-Zcrtdll 98# Compiler flags for compiling shared object in multi threaded environment with graphical user interface 99CFLAGSSLOGUIMT=$(PICSWITCH) -Zdll -Zcrtdll 100# Compiler flags for compiling shared object in multi threaded environment with character user interface 101CFLAGSSLOCUIMT=$(PICSWITCH) -Zdll -Zcrtdll 102# Compiler flags for profiling 103CFLAGSPROF= 104# Compiler flags for debugging 105CFLAGSDEBUG=-g 106CFLAGSDBGUTIL= 107# Compiler flags for enabling optimazations 108CFLAGSOPT=-s -O1 -march=pentium -mtune=pentium4 109# Compiler flags for disabling optimazations 110CFLAGSNOOPT=-O0 111# Compiler flags for discibing the output path 112CFLAGSOUTOBJ=-o 113 114# Warnings switched off for CXX: 115# - doubunder: we have many identifiers containing double underscores, some of 116# them in the stable UDK API we cannot change 117# - inllargeuse: "function is too large and will not be expanded inline" is 118# merely a hint 119# - inllargeint: "function is too large to generate inline, consider writing 120# it yourself" is merely a hint 121# - notemsource: "could not find source for function" appears to be spurious 122# - reftotemp: warns about calling non-const functions on temporary objects, 123# something legally done by boost::scoped_array<T>::reset, for example 124# (this_type(p).swap(*this)) 125# - truncwarn: "conversion of 64 bit type value to smaller type causes 126# truncation" at least with CC 5.8 is reported only at the end of a 127# compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see 128# sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be 129# disabled globally 130CFLAGSWARNCC= 131CFLAGSWARNCXX=+w2 -erroff=doubunder,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn 132CFLAGSWARNCXX= 133CFLAGSWALLCC=$(CFLAGSWARNCC) 134CFLAGSWALLCXX=$(CFLAGSWARNCXX) 135CFLAGSWERRCC=-errwarn=%all 136CFLAGSWERRCXX=-xwe 137 138# Once all modules on this platform compile without warnings, set 139# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see 140# settings.mk): 141MODULES_WITH_WARNINGS := \ 142 b_server \ 143 basctl \ 144 basebmp \ 145 canvas \ 146 chart2 \ 147 cppcanvas \ 148 desktop \ 149 devtools \ 150 dxcanvas \ 151 extensions \ 152 filter \ 153 glcanvas \ 154 lingu \ 155 r_tools \ 156 sc \ 157 sd \ 158 slideshow \ 159 starmath \ 160 svx \ 161 sw \ 162 writerperfect \ 163 xmlsecurity 164 165 166# switches for dynamic and static linking 167STATIC = 168DYNAMIC = 169 170# this is needed to allow stl headers to include os2.h instead of svpm.h 171# in earlier stages of project build. Once svpm.h is in place, we can 172# compile without this flag. 173.IF "$(STL_OS2_BUILDING)" != "" 174CFLAGS+=-DSTL_OS2_BUILDING 175CFLAGSCXX+=-DSTL_OS2_BUILDING 176.ENDIF 177 178# name of linker 179LINK*=gcc 180# default linker flags 181LINKFLAGS= -Zbin-files -Zmap 182#27/01/06 bin-files confuses transex/rsc work, removed. 183LINKFLAGS= -Zno-fork -Zhigh-mem -Zmap 184.IF "$(OS2_ARGS_WILD)" != "" 185LINKFLAGS+=-Zargs-wild -Zargs-resp 186.ENDIF 187 188.IF "$(aout)"=="" 189#LINKFLAGS+= -Zlinker /NOI -Zlinker /PACKD:65536 -Zlinker /EXEPACK:2 190#LINKFLAGS+= -Zlinker /NOExtdictionary 191LINKFLAGS+= -Zomf 192#LINKFLAGS+= -Zlinker "DISABLE 1121" 193.ENDIF 194 195 196# linker flags for linking applications 197.IF "$(aout)"=="" 198#LINKFLAGSAPPGUI= -Zlinker /PM:PM -Zstack 0x2000 199#LINKFLAGSAPPCUI= -Zlinker /PM:VIO 200.ELSE 201LINKFLAGSAPPGUI= 202LINKFLAGSAPPCUI= 203.ENDIF 204 205# linker flags for linking shared libraries 206LINKFLAGSSHLGUI= -Zdll #-Zsym 207LINKFLAGSSHLCUI= -Zdll #-Zsym 208 209.IF "$(aout)"=="" 210LINKFLAGSTACK=-Zlinker /STACK: 211LINKFLAGSPROF= 212#LINKFLAGSDEBUG=-Zlinker /DEBUG 213LINKFLAGSDEBUG=-g 214LINKFLAGSOPT=-g 215.ELSE 216LINKFLAGSTACK=-Zstack 217LINKFLAGSPROF= 218LINKFLAGSDEBUG=-g 219LINKFLAGSOPT=-s 220.ENDIF 221 222.IF "$(NO_BSYMBOLIC)"=="" 223.IF "$(PRJNAME)" != "envtest" 224LINKFLAGSSHLGUI+= 225LINKFLAGSSHLCUI+= 226.ENDIF 227.ENDIF # "$(NO_BSYMBOLIC)"=="" 228 229LINKVERSIONMAPFLAG=-Wl,--version-script 230 231SONAME_SWITCH=-Wl,-h 232 233# Sequence of libs does matter ! 234 235#STDLIBCPP=stdc++ supc++ gcc_eh 236#STDLIBCPP=stdc++ gcc432 237STDLIBCPP=stdc432 gcc432 238 239# default objectfilenames to link 240STDOBJVCL=$(L)/salmain.obj 241STDOBJGUI= 242STDSLOGUI= 243STDOBJCUI= 244STDSLOCUI= 245 246# libraries for linking applications 247STDLIBCUIST=$(STDLIBCPP) 248STDLIBGUIMT=$(STDLIBCPP) 249STDLIBCUIMT=$(STDLIBCPP) 250STDLIBGUIST=$(STDLIBCPP) 251# libraries for linking shared libraries 252STDSHLGUIMT=$(STDLIBCPP) 253STDSHLCUIMT=$(STDLIBCPP) 254 255LIBSTLPORT=$(DYNAMIC) stlp45.lib 256LIBSTLPORTST=$(STATIC) stlp45.lib $(DYNAMIC) 257 258 259# name of library manager 260LIBMGR=ar 261LIBFLAGS=crv 262 263.IF "$(aout)"=="" 264LIBMGR=emxomfar -p2048 265.ENDIF 266 267# tool for generating import libraries 268IMPLIB=emximp 269IMPLIBFLAGS=-o 270 271MAPSYM=mapsym 272MAPSYMFLAGS= 273 274RC=wrc -bt=os2 -i$(PATH_EMXPGCC)\include 275RCFLAGS=-r $(RCFILES) -fo=$@ 276RCLINK=wrc -bt=os2 277RCLINKFLAGS= 278RCSETVERSION= 279 280# platform specific identifier for shared libs 281DLLPOSTFIX= 282DLLPRE=lib 283DLLPOST=.dll 284 285