update dev300-m57
[ooovba.git] / solenv / inc / unxlngmips.mk
blob4b5c2aab9eff2fd892c20328a47eed0acf3f75bb
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: unxlngmips.mk,v $
11 # $Revision: 1.5 $
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 # mk file for unxlngmips
33 ASM=
34 AFLAGS=
36 SOLAR_JAVA*=
37 JAVAFLAGSDEBUG=-g
39 # filter for supressing verbose messages from linker
40 #not needed at the moment
41 #LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter"
43 # _PTHREADS is needed for the stl
44 CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DMIPS -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400
46 # enable visibility define in "sal/types.h"
47 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
48 CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
49 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
51 # this is a platform with JAVA support
52 .IF "$(SOLAR_JAVA)"!=""
53 JAVADEF=-DSOLAR_JAVA
54 .IF "$(debug)"==""
55 JAVA_RUNTIME=-ljava
56 .ELSE
57 JAVA_RUNTIME=-ljava_g
58 .ENDIF
59 .ENDIF
61 # architecture dependent flags for the C and C++ compiler that can be changed by
62 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
63 #ARCH_FLAGS*=-mtune=pentiumpro
65 # name of C++ Compiler
66 CXX*=g++
67 # name of C Compiler
68 CC*=gcc
69 .IF "$(SYSBASE)"!=""
70 CFLAGS_SYSBASE:=-isystem $(SYSBASE)$/usr$/include
71 CXX+:=$(CFLAGS_SYSBASE)
72 CC+:=$(CFLAGS_SYSBASE)
73 .ENDIF # "$(SYSBASE)"!=""
74 CFLAGS+=-fmessage-length=0 -c
76 # flags to enable build with symbols; required for crashdump feature
77 .IF "$(ENABLE_SYMBOLS)"=="SMALL"
78 CFLAGSENABLESYMBOLS=-g1
79 .ELSE
80 CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta
82 .ENDIF
84 # flags for the C++ Compiler
85 CFLAGSCC= -pipe $(ARCH_FLAGS)
86 # Flags for enabling exception handling
87 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
88 # Flags for disabling exception handling
89 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
91 # -fpermissive should be removed as soon as possible
92 CFLAGSCXX= -pipe $(ARCH_FLAGS)
93 PICSWITCH:=-fpic
94 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
95 CFLAGSCXX += -fvisibility-inlines-hidden
96 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
98 # Compiler flags for compiling static object in single threaded environment with graphical user interface
99 CFLAGSOBJGUIST=
100 # Compiler flags for compiling static object in single threaded environment with character user interface
101 CFLAGSOBJCUIST=
102 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
103 CFLAGSOBJGUIMT=
104 # Compiler flags for compiling static object in multi threaded environment with character user interface
105 CFLAGSOBJCUIMT=
106 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
107 CFLAGSSLOGUIMT=$(PICSWITCH)
108 # Compiler flags for compiling shared object in multi threaded environment with character user interface
109 CFLAGSSLOCUIMT=$(PICSWITCH)
110 # Compiler flags for profiling
111 CFLAGSPROF=
112 # Compiler flags for debugging
113 CFLAGSDEBUG=-g
114 CFLAGSDBGUTIL=
115 # Compiler flags for enabling optimizations
116 .IF "$(PRODUCT)"!=""
117 CFLAGSOPT=-Os -fno-strict-aliasing # optimizing for products
118 .ELSE # "$(PRODUCT)"!=""
119 CFLAGSOPT= # no optimizing for non products
120 .ENDIF # "$(PRODUCT)"!=""
121 # Compiler flags for disabling optimizations
122 CFLAGSNOOPT=-O0
123 # Compiler flags for describing the output path
124 CFLAGSOUTOBJ=-o
126 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
127 CFLAGSWARNCC=-Wall -Wextra -Wendif-labels
128 CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \
129 -Wno-non-virtual-dtor
130 CFLAGSWALLCC=$(CFLAGSWARNCC)
131 CFLAGSWALLCXX=$(CFLAGSWARNCXX)
132 CFLAGSWERRCC=-Werror
134 # Once all modules on this platform compile without warnings, set
135 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
136 # settings.mk):
137 MODULES_WITH_WARNINGS := \
138 b_server \
139 basctl \
140 basebmp \
141 chart2 \
142 cppcanvas \
143 desktop \
144 devtools \
145 dxcanvas \
146 extensions \
147 filter \
148 glcanvas \
149 lingu \
150 r_tools \
151 sc \
152 sd \
153 slideshow \
154 starmath \
155 svx \
156 sw \
157 writerperfect \
158 xmlsecurity
160 # switches for dynamic and static linking
161 STATIC = -Wl,-Bstatic
162 DYNAMIC = -Wl,-Bdynamic
164 # name of linker
165 LINK*=$(CXX)
166 LINKC*=$(CC)
168 # default linker flags
169 LINKFLAGSDEFS*=-Wl,-z,defs
170 LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\'
171 LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\'
172 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
173 LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
174 LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
175 LINKFLAGSRUNPATH_OXT=
176 LINKFLAGSRUNPATH_NONE=
177 LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS)
178 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
179 LINKFLAGS += -Wl,--as-needed
180 .ENDIF
182 # linker flags for linking applications
183 LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
184 LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
186 # linker flags for linking shared libraries
187 LINKFLAGSSHLGUI= -shared
188 LINKFLAGSSHLCUI= -shared
190 LINKFLAGSTACK=
191 LINKFLAGSPROF=
192 LINKFLAGSDEBUG=-g
193 LINKFLAGSOPT=
195 # linker flags for optimization (symbol hashtable)
196 # for now, applied to symbol scoped libraries, only
197 LINKFLAGSOPTIMIZE*=-Wl,-O1
198 LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
200 SONAME_SWITCH=-Wl,-h
202 # Sequence of libs does matter !
204 STDLIBCPP=-lstdc++
206 # default objectfilenames to link
207 STDOBJVCL=$(L)$/salmain.o
208 STDOBJGUI=
209 STDSLOGUI=
210 STDOBJCUI=
211 STDSLOCUI=
213 .IF "$(ALLOC)" == "TCMALLOC"
214 STDLIBCUIST+=-ltcmalloc
215 STDLIBGUIMT+=-ltcmalloc
216 STDLIBCUIMT+=-ltcmalloc
217 STDLIBGUIST+=-ltcmalloc
218 STDSHLGUIMT+=-ltcmalloc
219 STDSHLCUIMT+=-ltcmalloc
220 STDSHLGUIST+=-ltcmalloc
221 STDSHLCUIST+=-ltcmalloc
222 .ENDIF
224 # libraries for linking applications
225 STDLIBCUIST+=-ldl -lm
226 STDLIBGUIMT+=-lX11 -lXau -ldl -lpthread -lm
227 STDLIBCUIMT+=-ldl -lpthread -lm
228 STDLIBGUIST+=-lX11 -lXau -ldl -lm
229 # libraries for linking shared libraries
230 STDSHLGUIMT+=-lX11 -lXau -lXext -ldl -lpthread -lm
231 STDSHLCUIMT+=-ldl -lpthread -lm
232 STDSHLGUIST+=-lX11 -lXau -lXext -ldl -lm
233 STDSHLCUIST+=-ldl -lm
235 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
237 .IF "$(USE_STLP_DEBUG)" != ""
238 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
239 LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
240 .ELSE # "$(USE_STLP_DEBUG)" != ""
241 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
242 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
243 .ENDIF # "$(USE_STLP_DEBUG)" != ""
245 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
247 # name of library manager
248 LIBMGR=ar
249 LIBFLAGS=-r
251 # tool for generating import libraries
252 IMPLIB=
253 IMPLIBFLAGS=
255 MAPSYM=
256 MAPSYMFLAGS=
258 RC=irc
259 RCFLAGS=-fo$@ $(RCFILES)
260 RCLINK=
261 RCLINKFLAGS=
262 RCSETVERSION=
264 # platform specific identifier for shared libs
265 DLLPOSTFIX=lm
266 DLLPRE=lib
267 DLLPOST=.so