17871dc3eSAndrew Rist#************************************************************** 27871dc3eSAndrew Rist# 37871dc3eSAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 47871dc3eSAndrew Rist# or more contributor license agreements. See the NOTICE file 57871dc3eSAndrew Rist# distributed with this work for additional information 67871dc3eSAndrew Rist# regarding copyright ownership. The ASF licenses this file 77871dc3eSAndrew Rist# to you under the Apache License, Version 2.0 (the 87871dc3eSAndrew Rist# "License"); you may not use this file except in compliance 97871dc3eSAndrew Rist# with the License. You may obtain a copy of the License at 107871dc3eSAndrew Rist# 117871dc3eSAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 127871dc3eSAndrew Rist# 137871dc3eSAndrew Rist# Unless required by applicable law or agreed to in writing, 147871dc3eSAndrew Rist# software distributed under the License is distributed on an 157871dc3eSAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 167871dc3eSAndrew Rist# KIND, either express or implied. See the License for the 177871dc3eSAndrew Rist# specific language governing permissions and limitations 187871dc3eSAndrew Rist# under the License. 197871dc3eSAndrew Rist# 207871dc3eSAndrew Rist#************************************************************** 217871dc3eSAndrew Rist 227871dc3eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir# --- OS2-Environment ---------------------------------------------- 25cdf0e10cSrcweir 26cdf0e10cSrcweir#change output dir name using the object binary format. 27cdf0e10cSrcweir#.IF "$(aout)"=="" 28cdf0e10cSrcweir#OUTFMT=omf 29cdf0e10cSrcweir#.ELSE 30cdf0e10cSrcweir#OUTFMT=aout 31cdf0e10cSrcweir#.ENDIF 32cdf0e10cSrcweir#OUTPATH+=OUTFMT 33cdf0e10cSrcweir#INPATH+=OUTFMT 34cdf0e10cSrcweir#GVERDIR+=OUTFMT 35cdf0e10cSrcweir 36cdf0e10cSrcweir# mk file for os2gcci 37cdf0e10cSrcweirASM=as 38cdf0e10cSrcweirAFLAGS= 39cdf0e10cSrcweir 4010b7a200SYuri Dario# until we get a solution to libc ticket#251, use dmik's -q option. 4110b7a200SYuri DarioEMXOMFOPT = -q 4210b7a200SYuri Dario.EXPORT : EMXOMFOPT 4310b7a200SYuri Dario 44cdf0e10cSrcweir#//YD SOLAR_JAVA=TRUE 45cdf0e10cSrcweirJAVAFLAGSDEBUG=-g 46cdf0e10cSrcweir 47cdf0e10cSrcweir# filter for supressing verbose messages from linker 48cdf0e10cSrcweir#not needed at the moment 49cdf0e10cSrcweir#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter" 50cdf0e10cSrcweir 51cdf0e10cSrcweir.IF "$(ttt)"!="" 52cdf0e10cSrcweirCDEFS+=-E 53cdf0e10cSrcweir.ENDIF 54cdf0e10cSrcweir 55cdf0e10cSrcweir# _PTHREADS is needed for the stl 56cdf0e10cSrcweirCDEFS+=-DX86 -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 57cdf0e10cSrcweir 58cdf0e10cSrcweir# this is a platform with JAVA support 59cdf0e10cSrcweir.IF "$(SOLAR_JAVA)"!="" 60cdf0e10cSrcweirJAVADEF=-DSOLAR_JAVA 61cdf0e10cSrcweir.IF "$(debug)"=="" 62cdf0e10cSrcweirJAVA_RUNTIME=javai.lib 63cdf0e10cSrcweir.ELSE 64cdf0e10cSrcweirJAVA_RUNTIME=javai_g.lib 65cdf0e10cSrcweir.ENDIF 66cdf0e10cSrcweir.ENDIF 67cdf0e10cSrcweir 68cdf0e10cSrcweir# architecture dependent flags for the C and C++ compiler that can be changed by 69cdf0e10cSrcweir# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build 70cdf0e10cSrcweirARCH_FLAGS*= 71cdf0e10cSrcweir 72cdf0e10cSrcweir# name of C++ Compiler 73cdf0e10cSrcweirCXX*=g++ 74cdf0e10cSrcweir# name of C Compiler 75cdf0e10cSrcweirCC*=gcc 76cdf0e10cSrcweir# flags for C and C++ Compiler 77cdf0e10cSrcweirCFLAGS+=-c 78cdf0e10cSrcweir# flags for the C++ Compiler 79cdf0e10cSrcweirCFLAGSCC= $(ARCH_FLAGS) 80cdf0e10cSrcweir 81cdf0e10cSrcweir.IF "$(aout)"=="" 82cdf0e10cSrcweirCFLAGS+=-Zomf 83cdf0e10cSrcweir.ENDIF 84cdf0e10cSrcweir 85cdf0e10cSrcweir# Flags for enabling exception handling 86cdf0e10cSrcweirCFLAGSEXCEPTIONS=-fexceptions 87cdf0e10cSrcweir# Flags for disabling exception handling 88cdf0e10cSrcweirCFLAGS_NO_EXCEPTIONS=-fno-exceptions 89cdf0e10cSrcweir 90cdf0e10cSrcweirCFLAGSCXX= -frtti $(ARCH_FLAGS) 91cdf0e10cSrcweirCFLAGSCXX+= -Wno-ctor-dtor-privacy -fmessage-length=0 92cdf0e10cSrcweirPICSWITCH:= 93cdf0e10cSrcweir 94cdf0e10cSrcweir# Compiler flags for compiling static object in single threaded environment with graphical user interface 95cdf0e10cSrcweirCFLAGSOBJGUIST=-Zcrtdll 96cdf0e10cSrcweir# Compiler flags for compiling static object in single threaded environment with character user interface 97cdf0e10cSrcweirCFLAGSOBJCUIST=-Zcrtdll 98cdf0e10cSrcweir# Compiler flags for compiling static object in multi threaded environment with graphical user interface 99cdf0e10cSrcweirCFLAGSOBJGUIMT=-Zcrtdll 100cdf0e10cSrcweir# Compiler flags for compiling static object in multi threaded environment with character user interface 101cdf0e10cSrcweirCFLAGSOBJCUIMT=-Zcrtdll 102cdf0e10cSrcweir# Compiler flags for compiling shared object in multi threaded environment with graphical user interface 103cdf0e10cSrcweirCFLAGSSLOGUIMT=$(PICSWITCH) -Zdll -Zcrtdll 104cdf0e10cSrcweir# Compiler flags for compiling shared object in multi threaded environment with character user interface 105cdf0e10cSrcweirCFLAGSSLOCUIMT=$(PICSWITCH) -Zdll -Zcrtdll 106cdf0e10cSrcweir# Compiler flags for profiling 107cdf0e10cSrcweirCFLAGSPROF= 108cdf0e10cSrcweir# Compiler flags for debugging 109cdf0e10cSrcweirCFLAGSDEBUG=-g 110cdf0e10cSrcweirCFLAGSDBGUTIL= 111cdf0e10cSrcweir# Compiler flags for enabling optimazations 112cdf0e10cSrcweirCFLAGSOPT=-s -O1 -march=pentium -mtune=pentium4 113cdf0e10cSrcweir# Compiler flags for disabling optimazations 114cdf0e10cSrcweirCFLAGSNOOPT=-O0 115cdf0e10cSrcweir# Compiler flags for discibing the output path 116cdf0e10cSrcweirCFLAGSOUTOBJ=-o 117cdf0e10cSrcweir 118cdf0e10cSrcweir# Warnings switched off for CXX: 119cdf0e10cSrcweir# - doubunder: we have many identifiers containing double underscores, some of 120cdf0e10cSrcweir# them in the stable UDK API we cannot change 121cdf0e10cSrcweir# - inllargeuse: "function is too large and will not be expanded inline" is 122cdf0e10cSrcweir# merely a hint 123cdf0e10cSrcweir# - inllargeint: "function is too large to generate inline, consider writing 124cdf0e10cSrcweir# it yourself" is merely a hint 125cdf0e10cSrcweir# - notemsource: "could not find source for function" appears to be spurious 126cdf0e10cSrcweir# - reftotemp: warns about calling non-const functions on temporary objects, 127cdf0e10cSrcweir# something legally done by boost::scoped_array<T>::reset, for example 128cdf0e10cSrcweir# (this_type(p).swap(*this)) 129cdf0e10cSrcweir# - truncwarn: "conversion of 64 bit type value to smaller type causes 130cdf0e10cSrcweir# truncation" at least with CC 5.8 is reported only at the end of a 131cdf0e10cSrcweir# compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see 132cdf0e10cSrcweir# sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be 133cdf0e10cSrcweir# disabled globally 134cdf0e10cSrcweirCFLAGSWARNCC= 135cdf0e10cSrcweirCFLAGSWARNCXX=+w2 -erroff=doubunder,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn 136cdf0e10cSrcweirCFLAGSWARNCXX= 137cdf0e10cSrcweirCFLAGSWALLCC=$(CFLAGSWARNCC) 138cdf0e10cSrcweirCFLAGSWALLCXX=$(CFLAGSWARNCXX) 139cdf0e10cSrcweirCFLAGSWERRCC=-errwarn=%all 140cdf0e10cSrcweirCFLAGSWERRCXX=-xwe 141cdf0e10cSrcweir 142cdf0e10cSrcweir# Once all modules on this platform compile without warnings, set 143cdf0e10cSrcweir# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see 144cdf0e10cSrcweir# settings.mk): 145cdf0e10cSrcweirMODULES_WITH_WARNINGS := \ 146cdf0e10cSrcweir b_server \ 147cdf0e10cSrcweir basctl \ 148cdf0e10cSrcweir basebmp \ 149cdf0e10cSrcweir canvas \ 150cdf0e10cSrcweir chart2 \ 151cdf0e10cSrcweir cppcanvas \ 152cdf0e10cSrcweir desktop \ 153cdf0e10cSrcweir devtools \ 154cdf0e10cSrcweir dxcanvas \ 155cdf0e10cSrcweir extensions \ 156cdf0e10cSrcweir filter \ 157cdf0e10cSrcweir glcanvas \ 158cdf0e10cSrcweir lingu \ 159cdf0e10cSrcweir r_tools \ 160cdf0e10cSrcweir sc \ 161cdf0e10cSrcweir sd \ 162cdf0e10cSrcweir slideshow \ 163cdf0e10cSrcweir starmath \ 164cdf0e10cSrcweir svx \ 165cdf0e10cSrcweir sw \ 166cdf0e10cSrcweir writerperfect \ 167cdf0e10cSrcweir xmlsecurity 168cdf0e10cSrcweir 169cdf0e10cSrcweir 170cdf0e10cSrcweir# switches for dynamic and static linking 171cdf0e10cSrcweirSTATIC = 172cdf0e10cSrcweirDYNAMIC = 173cdf0e10cSrcweir 174cdf0e10cSrcweir# this is needed to allow stl headers to include os2.h instead of svpm.h 175cdf0e10cSrcweir# in earlier stages of project build. Once svpm.h is in place, we can 176cdf0e10cSrcweir# compile without this flag. 177cdf0e10cSrcweir.IF "$(STL_OS2_BUILDING)" != "" 178cdf0e10cSrcweirCFLAGS+=-DSTL_OS2_BUILDING 179cdf0e10cSrcweirCFLAGSCXX+=-DSTL_OS2_BUILDING 180cdf0e10cSrcweir.ENDIF 181cdf0e10cSrcweir 182534c536dSYuri DarioCFLAGS+=$(LIBXML_CFLAGS) -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/os2 183534c536dSYuri DarioCFLAGSCXX+=$(LIBXML_CFLAGS) -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/os2 184534c536dSYuri Dario 185cdf0e10cSrcweir# name of linker 186cdf0e10cSrcweirLINK*=gcc 187cdf0e10cSrcweir# default linker flags 188cdf0e10cSrcweirLINKFLAGS= -Zbin-files -Zmap 189cdf0e10cSrcweir#27/01/06 bin-files confuses transex/rsc work, removed. 190cdf0e10cSrcweirLINKFLAGS= -Zno-fork -Zhigh-mem -Zmap 191cdf0e10cSrcweir.IF "$(OS2_ARGS_WILD)" != "" 192cdf0e10cSrcweirLINKFLAGS+=-Zargs-wild -Zargs-resp 193cdf0e10cSrcweir.ENDIF 194cdf0e10cSrcweir 195cdf0e10cSrcweir.IF "$(aout)"=="" 196cdf0e10cSrcweir#LINKFLAGS+= -Zlinker /NOI -Zlinker /PACKD:65536 -Zlinker /EXEPACK:2 197cdf0e10cSrcweir#LINKFLAGS+= -Zlinker /NOExtdictionary 198cdf0e10cSrcweirLINKFLAGS+= -Zomf 199534c536dSYuri DarioLINKFLAGS+= -Zlinker "DISABLE 1121" 200cdf0e10cSrcweir.ENDIF 201cdf0e10cSrcweir 202cdf0e10cSrcweir 203cdf0e10cSrcweir# linker flags for linking applications 204cdf0e10cSrcweir.IF "$(aout)"=="" 205cdf0e10cSrcweir#LINKFLAGSAPPGUI= -Zlinker /PM:PM -Zstack 0x2000 206cdf0e10cSrcweir#LINKFLAGSAPPCUI= -Zlinker /PM:VIO 207cdf0e10cSrcweir.ELSE 208cdf0e10cSrcweirLINKFLAGSAPPGUI= 209cdf0e10cSrcweirLINKFLAGSAPPCUI= 210cdf0e10cSrcweir.ENDIF 211cdf0e10cSrcweir 212cdf0e10cSrcweir# linker flags for linking shared libraries 213cdf0e10cSrcweirLINKFLAGSSHLGUI= -Zdll #-Zsym 214cdf0e10cSrcweirLINKFLAGSSHLCUI= -Zdll #-Zsym 215cdf0e10cSrcweir 216cdf0e10cSrcweir.IF "$(aout)"=="" 217cdf0e10cSrcweirLINKFLAGSTACK=-Zlinker /STACK: 218cdf0e10cSrcweirLINKFLAGSPROF= 219cdf0e10cSrcweir#LINKFLAGSDEBUG=-Zlinker /DEBUG 220cdf0e10cSrcweirLINKFLAGSDEBUG=-g 221cdf0e10cSrcweirLINKFLAGSOPT=-g 222cdf0e10cSrcweir.ELSE 223cdf0e10cSrcweirLINKFLAGSTACK=-Zstack 224cdf0e10cSrcweirLINKFLAGSPROF= 225cdf0e10cSrcweirLINKFLAGSDEBUG=-g 226cdf0e10cSrcweirLINKFLAGSOPT=-s 227cdf0e10cSrcweir.ENDIF 228cdf0e10cSrcweir 229cdf0e10cSrcweir.IF "$(NO_BSYMBOLIC)"=="" 230cdf0e10cSrcweir.IF "$(PRJNAME)" != "envtest" 231cdf0e10cSrcweirLINKFLAGSSHLGUI+= 232cdf0e10cSrcweirLINKFLAGSSHLCUI+= 233cdf0e10cSrcweir.ENDIF 234cdf0e10cSrcweir.ENDIF # "$(NO_BSYMBOLIC)"=="" 235cdf0e10cSrcweir 236cdf0e10cSrcweirLINKVERSIONMAPFLAG=-Wl,--version-script 237cdf0e10cSrcweir 238cdf0e10cSrcweirSONAME_SWITCH=-Wl,-h 239cdf0e10cSrcweir 240cdf0e10cSrcweir# Sequence of libs does matter ! 241cdf0e10cSrcweir 242cdf0e10cSrcweir#STDLIBCPP=stdc++ supc++ gcc_eh 243cdf0e10cSrcweir#STDLIBCPP=stdc++ gcc432 244534c536dSYuri DarioSTDLIBCPP=-lstdc++ -lgcc_so_d 245cdf0e10cSrcweir 246cdf0e10cSrcweir# default objectfilenames to link 247534c536dSYuri DarioSTDOBJVCL=$(L)/salmain.o 248cdf0e10cSrcweirSTDOBJGUI= 249cdf0e10cSrcweirSTDSLOGUI= 250cdf0e10cSrcweirSTDOBJCUI= 251cdf0e10cSrcweirSTDSLOCUI= 252cdf0e10cSrcweir 253cdf0e10cSrcweir# libraries for linking applications 254cdf0e10cSrcweirSTDLIBCUIST=$(STDLIBCPP) 255cdf0e10cSrcweirSTDLIBGUIMT=$(STDLIBCPP) 256cdf0e10cSrcweirSTDLIBCUIMT=$(STDLIBCPP) 257cdf0e10cSrcweirSTDLIBGUIST=$(STDLIBCPP) 258cdf0e10cSrcweir# libraries for linking shared libraries 259cdf0e10cSrcweirSTDSHLGUIMT=$(STDLIBCPP) 260cdf0e10cSrcweirSTDSHLCUIMT=$(STDLIBCPP) 261cdf0e10cSrcweir 262534c536dSYuri DarioLIBSTLPORT=stlp45.lib $(DYNAMIC) 263534c536dSYuri DarioLIBSTLPORTST=stlp45.lib $(STATIC) $(DYNAMIC) 264cdf0e10cSrcweir 265cdf0e10cSrcweir 266cdf0e10cSrcweir# name of library manager 267cdf0e10cSrcweirLIBMGR=ar 268534c536dSYuri DarioLIBFLAGS=-crv 269cdf0e10cSrcweir 270cdf0e10cSrcweir.IF "$(aout)"=="" 271cdf0e10cSrcweirLIBMGR=emxomfar -p2048 272cdf0e10cSrcweir.ENDIF 273cdf0e10cSrcweir 274cdf0e10cSrcweir# tool for generating import libraries 275*cde270a3SYuri DarioIMPLIB=emximp -p2048 276cdf0e10cSrcweirIMPLIBFLAGS=-o 277cdf0e10cSrcweir 278cdf0e10cSrcweirMAPSYM=mapsym 279cdf0e10cSrcweirMAPSYMFLAGS= 280cdf0e10cSrcweir 2814d2a3edfSYuri DarioRC=wrc -q -bt=os2 -i$(PATH_EMXPGCC)\include 282cdf0e10cSrcweirRCFLAGS=-r $(RCFILES) -fo=$@ 283cdf0e10cSrcweirRCLINK=wrc -bt=os2 284cdf0e10cSrcweirRCLINKFLAGS= 285cdf0e10cSrcweirRCSETVERSION= 286cdf0e10cSrcweir 287cdf0e10cSrcweir# platform specific identifier for shared libs 288a4f23604SHerbert DürrDLLPOSTFIX= 289cdf0e10cSrcweirDLLPRE=lib 290cdf0e10cSrcweirDLLPOST=.dll 291cdf0e10cSrcweir 292