1cdf0e10cSrcweir#************************************************************************* 2cdf0e10cSrcweir# 3cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4cdf0e10cSrcweir# 5cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates. 6cdf0e10cSrcweir# 7cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite 8cdf0e10cSrcweir# 9cdf0e10cSrcweir# This file is part of OpenOffice.org. 10cdf0e10cSrcweir# 11cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify 12cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3 13cdf0e10cSrcweir# only, as published by the Free Software Foundation. 14cdf0e10cSrcweir# 15cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful, 16cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of 17cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details 19cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code). 20cdf0e10cSrcweir# 21cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License 22cdf0e10cSrcweir# version 3 along with OpenOffice.org. If not, see 23cdf0e10cSrcweir# <http://www.openoffice.org/license.html> 24cdf0e10cSrcweir# for a copy of the LGPLv3 License. 25cdf0e10cSrcweir# 26cdf0e10cSrcweir#************************************************************************* 27cdf0e10cSrcweir 28cdf0e10cSrcweir# --- OS2-Environment ---------------------------------------------- 29cdf0e10cSrcweir 30cdf0e10cSrcweir#change output dir name using the object binary format. 31cdf0e10cSrcweir#.IF "$(aout)"=="" 32cdf0e10cSrcweir#OUTFMT=omf 33cdf0e10cSrcweir#.ELSE 34cdf0e10cSrcweir#OUTFMT=aout 35cdf0e10cSrcweir#.ENDIF 36cdf0e10cSrcweir#OUTPATH+=OUTFMT 37cdf0e10cSrcweir#INPATH+=OUTFMT 38cdf0e10cSrcweir#GVERDIR+=OUTFMT 39cdf0e10cSrcweir 40cdf0e10cSrcweir# mk file for os2gcci 41cdf0e10cSrcweirASM=as 42cdf0e10cSrcweirAFLAGS= 43cdf0e10cSrcweir 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 182cdf0e10cSrcweir# name of linker 183cdf0e10cSrcweirLINK*=gcc 184cdf0e10cSrcweir# default linker flags 185cdf0e10cSrcweirLINKFLAGS= -Zbin-files -Zmap 186cdf0e10cSrcweir#27/01/06 bin-files confuses transex/rsc work, removed. 187cdf0e10cSrcweirLINKFLAGS= -Zno-fork -Zhigh-mem -Zmap 188cdf0e10cSrcweir.IF "$(OS2_ARGS_WILD)" != "" 189cdf0e10cSrcweirLINKFLAGS+=-Zargs-wild -Zargs-resp 190cdf0e10cSrcweir.ENDIF 191cdf0e10cSrcweir 192cdf0e10cSrcweir.IF "$(aout)"=="" 193cdf0e10cSrcweir#LINKFLAGS+= -Zlinker /NOI -Zlinker /PACKD:65536 -Zlinker /EXEPACK:2 194cdf0e10cSrcweir#LINKFLAGS+= -Zlinker /NOExtdictionary 195cdf0e10cSrcweirLINKFLAGS+= -Zomf 196cdf0e10cSrcweir#LINKFLAGS+= -Zlinker "DISABLE 1121" 197cdf0e10cSrcweir.ENDIF 198cdf0e10cSrcweir 199cdf0e10cSrcweir 200cdf0e10cSrcweir# linker flags for linking applications 201cdf0e10cSrcweir.IF "$(aout)"=="" 202cdf0e10cSrcweir#LINKFLAGSAPPGUI= -Zlinker /PM:PM -Zstack 0x2000 203cdf0e10cSrcweir#LINKFLAGSAPPCUI= -Zlinker /PM:VIO 204cdf0e10cSrcweir.ELSE 205cdf0e10cSrcweirLINKFLAGSAPPGUI= 206cdf0e10cSrcweirLINKFLAGSAPPCUI= 207cdf0e10cSrcweir.ENDIF 208cdf0e10cSrcweir 209cdf0e10cSrcweir# linker flags for linking shared libraries 210cdf0e10cSrcweirLINKFLAGSSHLGUI= -Zdll #-Zsym 211cdf0e10cSrcweirLINKFLAGSSHLCUI= -Zdll #-Zsym 212cdf0e10cSrcweir 213cdf0e10cSrcweir.IF "$(aout)"=="" 214cdf0e10cSrcweirLINKFLAGSTACK=-Zlinker /STACK: 215cdf0e10cSrcweirLINKFLAGSPROF= 216cdf0e10cSrcweir#LINKFLAGSDEBUG=-Zlinker /DEBUG 217cdf0e10cSrcweirLINKFLAGSDEBUG=-g 218cdf0e10cSrcweirLINKFLAGSOPT=-g 219cdf0e10cSrcweir.ELSE 220cdf0e10cSrcweirLINKFLAGSTACK=-Zstack 221cdf0e10cSrcweirLINKFLAGSPROF= 222cdf0e10cSrcweirLINKFLAGSDEBUG=-g 223cdf0e10cSrcweirLINKFLAGSOPT=-s 224cdf0e10cSrcweir.ENDIF 225cdf0e10cSrcweir 226cdf0e10cSrcweir.IF "$(NO_BSYMBOLIC)"=="" 227cdf0e10cSrcweir.IF "$(PRJNAME)" != "envtest" 228cdf0e10cSrcweirLINKFLAGSSHLGUI+= 229cdf0e10cSrcweirLINKFLAGSSHLCUI+= 230cdf0e10cSrcweir.ENDIF 231cdf0e10cSrcweir.ENDIF # "$(NO_BSYMBOLIC)"=="" 232cdf0e10cSrcweir 233cdf0e10cSrcweirLINKVERSIONMAPFLAG=-Wl,--version-script 234cdf0e10cSrcweir 235cdf0e10cSrcweirSONAME_SWITCH=-Wl,-h 236cdf0e10cSrcweir 237cdf0e10cSrcweir# Sequence of libs does matter ! 238cdf0e10cSrcweir 239cdf0e10cSrcweir#STDLIBCPP=stdc++ supc++ gcc_eh 240cdf0e10cSrcweir#STDLIBCPP=stdc++ gcc432 241cdf0e10cSrcweirSTDLIBCPP=stdc432 gcc432 242cdf0e10cSrcweir 243cdf0e10cSrcweir# default objectfilenames to link 244cdf0e10cSrcweirSTDOBJVCL=$(L)/salmain.obj 245cdf0e10cSrcweirSTDOBJGUI= 246cdf0e10cSrcweirSTDSLOGUI= 247cdf0e10cSrcweirSTDOBJCUI= 248cdf0e10cSrcweirSTDSLOCUI= 249cdf0e10cSrcweir 250cdf0e10cSrcweir# libraries for linking applications 251cdf0e10cSrcweirSTDLIBCUIST=$(STDLIBCPP) 252cdf0e10cSrcweirSTDLIBGUIMT=$(STDLIBCPP) 253cdf0e10cSrcweirSTDLIBCUIMT=$(STDLIBCPP) 254cdf0e10cSrcweirSTDLIBGUIST=$(STDLIBCPP) 255cdf0e10cSrcweir# libraries for linking shared libraries 256cdf0e10cSrcweirSTDSHLGUIMT=$(STDLIBCPP) 257cdf0e10cSrcweirSTDSHLCUIMT=$(STDLIBCPP) 258cdf0e10cSrcweir 259cdf0e10cSrcweirLIBSTLPORT=$(DYNAMIC) stlp45.lib 260cdf0e10cSrcweirLIBSTLPORTST=$(STATIC) stlp45.lib $(DYNAMIC) 261cdf0e10cSrcweir 262cdf0e10cSrcweir 263cdf0e10cSrcweir# name of library manager 264cdf0e10cSrcweirLIBMGR=ar 265cdf0e10cSrcweirLIBFLAGS=crv 266cdf0e10cSrcweir 267cdf0e10cSrcweir.IF "$(aout)"=="" 268cdf0e10cSrcweirLIBMGR=emxomfar -p2048 269cdf0e10cSrcweir.ENDIF 270cdf0e10cSrcweir 271cdf0e10cSrcweir# tool for generating import libraries 272cdf0e10cSrcweirIMPLIB=emximp 273cdf0e10cSrcweirIMPLIBFLAGS=-o 274cdf0e10cSrcweir 275cdf0e10cSrcweirMAPSYM=mapsym 276cdf0e10cSrcweirMAPSYMFLAGS= 277cdf0e10cSrcweir 278cdf0e10cSrcweirRC=wrc -bt=os2 -i$(PATH_EMXPGCC)\include 279cdf0e10cSrcweirRCFLAGS=-r $(RCFILES) -fo=$@ 280cdf0e10cSrcweirRCLINK=wrc -bt=os2 281cdf0e10cSrcweirRCLINKFLAGS= 282cdf0e10cSrcweirRCSETVERSION= 283cdf0e10cSrcweir 284cdf0e10cSrcweir# platform specific identifier for shared libs 285*a4f23604SHerbert DürrDLLPOSTFIX= 286cdf0e10cSrcweirDLLPRE=lib 287cdf0e10cSrcweirDLLPOST=.dll 288cdf0e10cSrcweir 289