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