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