1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
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.
51 # filter for supressing verbose messages from linker
52 #not needed at the moment
53 #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
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)"!=""
66 JAVA_RUNTIME
=javai.lib
68 JAVA_RUNTIME
=javai_g.lib
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
76 # name of C++ Compiler
80 # flags for C and C++ Compiler
82 # flags for the C++ Compiler
83 CFLAGSCC
= $(ARCH_FLAGS
)
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
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
112 # Compiler flags for debugging
115 # Compiler flags for enabling optimazations
116 CFLAGSOPT
=-s
-O1
-march
=pentium
-mtune
=pentium4
117 # Compiler flags for disabling optimazations
119 # Compiler flags for discibing the output path
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
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
139 CFLAGSWARNCXX
=+w2
-erroff
=doubunder
,inllargeuse
,inllargeint
,notemsource
,reftotemp
,truncwarn
141 CFLAGSWALLCC
=$(CFLAGSWARNCC
)
142 CFLAGSWALLCXX
=$(CFLAGSWARNCXX
)
143 CFLAGSWERRCC
=-errwarn
=%all
146 # Once all modules on this platform compile without warnings, set
147 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
149 MODULES_WITH_WARNINGS
:= \
174 # switches for dynamic and static linking
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
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
197 #LINKFLAGS+= -Zlinker /NOI -Zlinker /PACKD:65536 -Zlinker /EXEPACK:2
198 #LINKFLAGS+= -Zlinker /NOExtdictionary
200 #LINKFLAGS+= -Zlinker "DISABLE 1121"
204 # linker flags for linking applications
206 #LINKFLAGSAPPGUI= -Zlinker /PM:PM -Zstack 0x2000
207 #LINKFLAGSAPPCUI= -Zlinker /PM:VIO
213 # linker flags for linking shared libraries
214 LINKFLAGSSHLGUI
= -Zdll
#-Zsym
215 LINKFLAGSSHLCUI
= -Zdll
#-Zsym
218 LINKFLAGSTACK
=-Zlinker
/STACK
:
220 #LINKFLAGSDEBUG=-Zlinker /DEBUG
224 LINKFLAGSTACK
=-Zstack
230 .IF
"$(NO_BSYMBOLIC)"==""
231 .IF
"$(PRJNAME)" != "envtest"
235 .ENDIF
# "$(NO_BSYMBOLIC)"==""
237 LINKVERSIONMAPFLAG
=-Wl
,--version-script
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
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
272 LIBMGR
=emxomfar
-p2048
275 # tool for generating import libraries
282 RC
=wrc
-bt
=os2
-i
$(PATH_EMXPGCC
)\
include
283 RCFLAGS
=-r
$(RCFILES
) -fo
=$@
288 # platform specific identifier for shared libs