xref: /aoo41x/main/solenv/inc/os2gcci.mk (revision cdf0e10c)
1*cdf0e10cSrcweir#*************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir#*************************************************************************
27*cdf0e10cSrcweir
28*cdf0e10cSrcweir# --- OS2-Environment ----------------------------------------------
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir#change output dir name using the object binary format.
31*cdf0e10cSrcweir#.IF "$(aout)"==""
32*cdf0e10cSrcweir#OUTFMT=omf
33*cdf0e10cSrcweir#.ELSE
34*cdf0e10cSrcweir#OUTFMT=aout
35*cdf0e10cSrcweir#.ENDIF
36*cdf0e10cSrcweir#OUTPATH+=OUTFMT
37*cdf0e10cSrcweir#INPATH+=OUTFMT
38*cdf0e10cSrcweir#GVERDIR+=OUTFMT
39*cdf0e10cSrcweir
40*cdf0e10cSrcweir# mk file for os2gcci
41*cdf0e10cSrcweirASM=as
42*cdf0e10cSrcweirAFLAGS=
43*cdf0e10cSrcweir
44*cdf0e10cSrcweir#//YD SOLAR_JAVA=TRUE
45*cdf0e10cSrcweirJAVAFLAGSDEBUG=-g
46*cdf0e10cSrcweir
47*cdf0e10cSrcweir# filter for supressing verbose messages from linker
48*cdf0e10cSrcweir#not needed at the moment
49*cdf0e10cSrcweir#LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
50*cdf0e10cSrcweir
51*cdf0e10cSrcweir.IF "$(ttt)"!=""
52*cdf0e10cSrcweirCDEFS+=-E
53*cdf0e10cSrcweir.ENDIF
54*cdf0e10cSrcweir
55*cdf0e10cSrcweir# _PTHREADS is needed for the stl
56*cdf0e10cSrcweirCDEFS+=-DX86 -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400
57*cdf0e10cSrcweir
58*cdf0e10cSrcweir# this is a platform with JAVA support
59*cdf0e10cSrcweir.IF "$(SOLAR_JAVA)"!=""
60*cdf0e10cSrcweirJAVADEF=-DSOLAR_JAVA
61*cdf0e10cSrcweir.IF "$(debug)"==""
62*cdf0e10cSrcweirJAVA_RUNTIME=javai.lib
63*cdf0e10cSrcweir.ELSE
64*cdf0e10cSrcweirJAVA_RUNTIME=javai_g.lib
65*cdf0e10cSrcweir.ENDIF
66*cdf0e10cSrcweir.ENDIF
67*cdf0e10cSrcweir
68*cdf0e10cSrcweir# architecture dependent flags for the C and C++ compiler that can be changed by
69*cdf0e10cSrcweir# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
70*cdf0e10cSrcweirARCH_FLAGS*=
71*cdf0e10cSrcweir
72*cdf0e10cSrcweir# name of C++ Compiler
73*cdf0e10cSrcweirCXX*=g++
74*cdf0e10cSrcweir# name of C Compiler
75*cdf0e10cSrcweirCC*=gcc
76*cdf0e10cSrcweir# flags for C and C++ Compiler
77*cdf0e10cSrcweirCFLAGS+=-c
78*cdf0e10cSrcweir# flags for the C++ Compiler
79*cdf0e10cSrcweirCFLAGSCC= $(ARCH_FLAGS)
80*cdf0e10cSrcweir
81*cdf0e10cSrcweir.IF "$(aout)"==""
82*cdf0e10cSrcweirCFLAGS+=-Zomf
83*cdf0e10cSrcweir.ENDIF
84*cdf0e10cSrcweir
85*cdf0e10cSrcweir# Flags for enabling exception handling
86*cdf0e10cSrcweirCFLAGSEXCEPTIONS=-fexceptions
87*cdf0e10cSrcweir# Flags for disabling exception handling
88*cdf0e10cSrcweirCFLAGS_NO_EXCEPTIONS=-fno-exceptions
89*cdf0e10cSrcweir
90*cdf0e10cSrcweirCFLAGSCXX= -frtti $(ARCH_FLAGS)
91*cdf0e10cSrcweirCFLAGSCXX+= -Wno-ctor-dtor-privacy  -fmessage-length=0
92*cdf0e10cSrcweirPICSWITCH:=
93*cdf0e10cSrcweir
94*cdf0e10cSrcweir# Compiler flags for compiling static object in single threaded environment with graphical user interface
95*cdf0e10cSrcweirCFLAGSOBJGUIST=-Zcrtdll
96*cdf0e10cSrcweir# Compiler flags for compiling static object in single threaded environment with character user interface
97*cdf0e10cSrcweirCFLAGSOBJCUIST=-Zcrtdll
98*cdf0e10cSrcweir# Compiler flags for compiling static object in multi threaded environment with graphical user interface
99*cdf0e10cSrcweirCFLAGSOBJGUIMT=-Zcrtdll
100*cdf0e10cSrcweir# Compiler flags for compiling static object in multi threaded environment with character user interface
101*cdf0e10cSrcweirCFLAGSOBJCUIMT=-Zcrtdll
102*cdf0e10cSrcweir# Compiler flags for compiling shared object in multi threaded environment with graphical user interface
103*cdf0e10cSrcweirCFLAGSSLOGUIMT=$(PICSWITCH) -Zdll -Zcrtdll
104*cdf0e10cSrcweir# Compiler flags for compiling shared object in multi threaded environment with character user interface
105*cdf0e10cSrcweirCFLAGSSLOCUIMT=$(PICSWITCH) -Zdll -Zcrtdll
106*cdf0e10cSrcweir# Compiler flags for profiling
107*cdf0e10cSrcweirCFLAGSPROF=
108*cdf0e10cSrcweir# Compiler flags for debugging
109*cdf0e10cSrcweirCFLAGSDEBUG=-g
110*cdf0e10cSrcweirCFLAGSDBGUTIL=
111*cdf0e10cSrcweir# Compiler flags for enabling optimazations
112*cdf0e10cSrcweirCFLAGSOPT=-s -O1 -march=pentium -mtune=pentium4
113*cdf0e10cSrcweir# Compiler flags for disabling optimazations
114*cdf0e10cSrcweirCFLAGSNOOPT=-O0
115*cdf0e10cSrcweir# Compiler flags for discibing the output path
116*cdf0e10cSrcweirCFLAGSOUTOBJ=-o
117*cdf0e10cSrcweir
118*cdf0e10cSrcweir# Warnings switched off for CXX:
119*cdf0e10cSrcweir# - doubunder: we have many identifiers containing double underscores, some of
120*cdf0e10cSrcweir#   them in the stable UDK API we cannot change
121*cdf0e10cSrcweir# - inllargeuse: "function is too large and will not be expanded inline" is
122*cdf0e10cSrcweir#   merely a hint
123*cdf0e10cSrcweir# - inllargeint: "function is too large to generate inline, consider writing
124*cdf0e10cSrcweir#   it yourself" is merely a hint
125*cdf0e10cSrcweir# - notemsource: "could not find source for function" appears to be spurious
126*cdf0e10cSrcweir# - reftotemp: warns about calling non-const functions on temporary objects,
127*cdf0e10cSrcweir#   something legally done by boost::scoped_array<T>::reset, for example
128*cdf0e10cSrcweir#   (this_type(p).swap(*this))
129*cdf0e10cSrcweir# - truncwarn: "conversion of 64 bit type value to smaller type causes
130*cdf0e10cSrcweir#   truncation" at least with CC 5.8 is reported only at the end of a
131*cdf0e10cSrcweir#   compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see
132*cdf0e10cSrcweir#   sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be
133*cdf0e10cSrcweir#   disabled globally
134*cdf0e10cSrcweirCFLAGSWARNCC=
135*cdf0e10cSrcweirCFLAGSWARNCXX=+w2 -erroff=doubunder,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn
136*cdf0e10cSrcweirCFLAGSWARNCXX=
137*cdf0e10cSrcweirCFLAGSWALLCC=$(CFLAGSWARNCC)
138*cdf0e10cSrcweirCFLAGSWALLCXX=$(CFLAGSWARNCXX)
139*cdf0e10cSrcweirCFLAGSWERRCC=-errwarn=%all
140*cdf0e10cSrcweirCFLAGSWERRCXX=-xwe
141*cdf0e10cSrcweir
142*cdf0e10cSrcweir# Once all modules on this platform compile without warnings, set
143*cdf0e10cSrcweir# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
144*cdf0e10cSrcweir# settings.mk):
145*cdf0e10cSrcweirMODULES_WITH_WARNINGS := \
146*cdf0e10cSrcweir    b_server \
147*cdf0e10cSrcweir    basctl \
148*cdf0e10cSrcweir    basebmp \
149*cdf0e10cSrcweir    canvas \
150*cdf0e10cSrcweir    chart2 \
151*cdf0e10cSrcweir    cppcanvas \
152*cdf0e10cSrcweir    desktop \
153*cdf0e10cSrcweir    devtools \
154*cdf0e10cSrcweir    dxcanvas \
155*cdf0e10cSrcweir    extensions \
156*cdf0e10cSrcweir    filter \
157*cdf0e10cSrcweir    glcanvas \
158*cdf0e10cSrcweir    lingu \
159*cdf0e10cSrcweir    r_tools \
160*cdf0e10cSrcweir    sc \
161*cdf0e10cSrcweir    sd \
162*cdf0e10cSrcweir    slideshow \
163*cdf0e10cSrcweir    starmath \
164*cdf0e10cSrcweir    svx \
165*cdf0e10cSrcweir    sw \
166*cdf0e10cSrcweir    writerperfect \
167*cdf0e10cSrcweir    xmlsecurity
168*cdf0e10cSrcweir
169*cdf0e10cSrcweir
170*cdf0e10cSrcweir# switches for dynamic and static linking
171*cdf0e10cSrcweirSTATIC		=
172*cdf0e10cSrcweirDYNAMIC		=
173*cdf0e10cSrcweir
174*cdf0e10cSrcweir# this is needed to allow stl headers to include os2.h instead of svpm.h
175*cdf0e10cSrcweir# in earlier stages of project build. Once svpm.h is in place, we can
176*cdf0e10cSrcweir# compile without this flag.
177*cdf0e10cSrcweir.IF "$(STL_OS2_BUILDING)" != ""
178*cdf0e10cSrcweirCFLAGS+=-DSTL_OS2_BUILDING
179*cdf0e10cSrcweirCFLAGSCXX+=-DSTL_OS2_BUILDING
180*cdf0e10cSrcweir.ENDIF
181*cdf0e10cSrcweir
182*cdf0e10cSrcweir# name of linker
183*cdf0e10cSrcweirLINK*=gcc
184*cdf0e10cSrcweir# default linker flags
185*cdf0e10cSrcweirLINKFLAGS= -Zbin-files -Zmap
186*cdf0e10cSrcweir#27/01/06 bin-files confuses transex/rsc work, removed.
187*cdf0e10cSrcweirLINKFLAGS= -Zno-fork -Zhigh-mem -Zmap
188*cdf0e10cSrcweir.IF "$(OS2_ARGS_WILD)" != ""
189*cdf0e10cSrcweirLINKFLAGS+=-Zargs-wild -Zargs-resp
190*cdf0e10cSrcweir.ENDIF
191*cdf0e10cSrcweir
192*cdf0e10cSrcweir.IF "$(aout)"==""
193*cdf0e10cSrcweir#LINKFLAGS+= -Zlinker /NOI -Zlinker /PACKD:65536 -Zlinker /EXEPACK:2
194*cdf0e10cSrcweir#LINKFLAGS+= -Zlinker /NOExtdictionary
195*cdf0e10cSrcweirLINKFLAGS+= -Zomf
196*cdf0e10cSrcweir#LINKFLAGS+= -Zlinker "DISABLE 1121"
197*cdf0e10cSrcweir.ENDIF
198*cdf0e10cSrcweir
199*cdf0e10cSrcweir
200*cdf0e10cSrcweir# linker flags for linking applications
201*cdf0e10cSrcweir.IF "$(aout)"==""
202*cdf0e10cSrcweir#LINKFLAGSAPPGUI= -Zlinker /PM:PM -Zstack 0x2000
203*cdf0e10cSrcweir#LINKFLAGSAPPCUI= -Zlinker /PM:VIO
204*cdf0e10cSrcweir.ELSE
205*cdf0e10cSrcweirLINKFLAGSAPPGUI=
206*cdf0e10cSrcweirLINKFLAGSAPPCUI=
207*cdf0e10cSrcweir.ENDIF
208*cdf0e10cSrcweir
209*cdf0e10cSrcweir# linker flags for linking shared libraries
210*cdf0e10cSrcweirLINKFLAGSSHLGUI= -Zdll #-Zsym
211*cdf0e10cSrcweirLINKFLAGSSHLCUI= -Zdll #-Zsym
212*cdf0e10cSrcweir
213*cdf0e10cSrcweir.IF "$(aout)"==""
214*cdf0e10cSrcweirLINKFLAGSTACK=-Zlinker /STACK:
215*cdf0e10cSrcweirLINKFLAGSPROF=
216*cdf0e10cSrcweir#LINKFLAGSDEBUG=-Zlinker /DEBUG
217*cdf0e10cSrcweirLINKFLAGSDEBUG=-g
218*cdf0e10cSrcweirLINKFLAGSOPT=-g
219*cdf0e10cSrcweir.ELSE
220*cdf0e10cSrcweirLINKFLAGSTACK=-Zstack
221*cdf0e10cSrcweirLINKFLAGSPROF=
222*cdf0e10cSrcweirLINKFLAGSDEBUG=-g
223*cdf0e10cSrcweirLINKFLAGSOPT=-s
224*cdf0e10cSrcweir.ENDIF
225*cdf0e10cSrcweir
226*cdf0e10cSrcweir.IF "$(NO_BSYMBOLIC)"==""
227*cdf0e10cSrcweir.IF "$(PRJNAME)" != "envtest"
228*cdf0e10cSrcweirLINKFLAGSSHLGUI+=
229*cdf0e10cSrcweirLINKFLAGSSHLCUI+=
230*cdf0e10cSrcweir.ENDIF
231*cdf0e10cSrcweir.ENDIF				# "$(NO_BSYMBOLIC)"==""
232*cdf0e10cSrcweir
233*cdf0e10cSrcweirLINKVERSIONMAPFLAG=-Wl,--version-script
234*cdf0e10cSrcweir
235*cdf0e10cSrcweirSONAME_SWITCH=-Wl,-h
236*cdf0e10cSrcweir
237*cdf0e10cSrcweir# Sequence of libs does matter !
238*cdf0e10cSrcweir
239*cdf0e10cSrcweir#STDLIBCPP=stdc++ supc++ gcc_eh
240*cdf0e10cSrcweir#STDLIBCPP=stdc++ gcc432
241*cdf0e10cSrcweirSTDLIBCPP=stdc432 gcc432
242*cdf0e10cSrcweir
243*cdf0e10cSrcweir# default objectfilenames to link
244*cdf0e10cSrcweirSTDOBJVCL=$(L)/salmain.obj
245*cdf0e10cSrcweirSTDOBJGUI=
246*cdf0e10cSrcweirSTDSLOGUI=
247*cdf0e10cSrcweirSTDOBJCUI=
248*cdf0e10cSrcweirSTDSLOCUI=
249*cdf0e10cSrcweir
250*cdf0e10cSrcweir# libraries for linking applications
251*cdf0e10cSrcweirSTDLIBCUIST=$(STDLIBCPP)
252*cdf0e10cSrcweirSTDLIBGUIMT=$(STDLIBCPP)
253*cdf0e10cSrcweirSTDLIBCUIMT=$(STDLIBCPP)
254*cdf0e10cSrcweirSTDLIBGUIST=$(STDLIBCPP)
255*cdf0e10cSrcweir# libraries for linking shared libraries
256*cdf0e10cSrcweirSTDSHLGUIMT=$(STDLIBCPP)
257*cdf0e10cSrcweirSTDSHLCUIMT=$(STDLIBCPP)
258*cdf0e10cSrcweir
259*cdf0e10cSrcweirLIBSTLPORT=$(DYNAMIC) stlp45.lib
260*cdf0e10cSrcweirLIBSTLPORTST=$(STATIC) stlp45.lib $(DYNAMIC)
261*cdf0e10cSrcweir
262*cdf0e10cSrcweir
263*cdf0e10cSrcweir# name of library manager
264*cdf0e10cSrcweirLIBMGR=ar
265*cdf0e10cSrcweirLIBFLAGS=crv
266*cdf0e10cSrcweir
267*cdf0e10cSrcweir.IF "$(aout)"==""
268*cdf0e10cSrcweirLIBMGR=emxomfar -p2048
269*cdf0e10cSrcweir.ENDIF
270*cdf0e10cSrcweir
271*cdf0e10cSrcweir# tool for generating import libraries
272*cdf0e10cSrcweirIMPLIB=emximp
273*cdf0e10cSrcweirIMPLIBFLAGS=-o
274*cdf0e10cSrcweir
275*cdf0e10cSrcweirMAPSYM=mapsym
276*cdf0e10cSrcweirMAPSYMFLAGS=
277*cdf0e10cSrcweir
278*cdf0e10cSrcweirRC=wrc -bt=os2 -i$(PATH_EMXPGCC)\include
279*cdf0e10cSrcweirRCFLAGS=-r $(RCFILES) -fo=$@
280*cdf0e10cSrcweirRCLINK=wrc -bt=os2
281*cdf0e10cSrcweirRCLINKFLAGS=
282*cdf0e10cSrcweirRCSETVERSION=
283*cdf0e10cSrcweir
284*cdf0e10cSrcweir# platform specific identifier for shared libs
285*cdf0e10cSrcweirDLLPOSTFIX=go
286*cdf0e10cSrcweirDLLPRE=lib
287*cdf0e10cSrcweirDLLPOST=.dll
288*cdf0e10cSrcweir
289