update dev300-m58
[ooovba.git] / solenv / inc / unxlngx6.mk
blobbe8819a352b7fd283351e1380195c6a4fdf6feb6
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: unxlngx6.mk,v $
11 # $Revision: 1.19.12.1 $
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 unxlngx6
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 -DX86_64 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER)
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*=
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+=-Wreturn-type -fmessage-length=0 -c
75 # flags to enable build with symbols; required for crashdump feature
76 .IF "$(ENABLE_SYMBOLS)"=="SMALL"
77 CFLAGSENABLESYMBOLS=-g1
78 .ELSE
79 CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta
80 .ENDIF
82 # flags for the C++ Compiler
83 CFLAGSCC= -pipe $(ARCH_FLAGS)
84 # Flags for enabling exception handling
85 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
86 # Flags for disabling exception handling
87 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
89 # -fpermissive should be removed as soon as possible
90 CFLAGSCXX= -pipe $(ARCH_FLAGS)
91 CFLAGSCXX+= -Wno-ctor-dtor-privacy
92 CFLAGSCXX+= -fno-use-cxa-atexit
93 PICSWITCH:=-fpic
94 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" && "$(HAVE_GCC_VISIBILITY_BROKEN)" != "TRUE"
95 CFLAGSCXX += -fvisibility-inlines-hidden
96 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
98 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
99 CFLAGSOBJGUIMT=
100 # Compiler flags for compiling static object in multi threaded environment with character user interface
101 CFLAGSOBJCUIMT=
102 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
103 CFLAGSSLOGUIMT=$(PICSWITCH)
104 # Compiler flags for compiling shared object in multi threaded environment with character user interface
105 CFLAGSSLOCUIMT=$(PICSWITCH)
106 # Compiler flags for profiling
107 CFLAGSPROF=
108 # Compiler flags for debugging
109 CFLAGSDEBUG=-g
110 CFLAGSDBGUTIL=
111 # Compiler flags for enabling optimizations
112 .IF "$(PRODUCT)"!=""
113 CFLAGSOPT=-O2 -fno-strict-aliasing # optimizing for products
114 CFLAGSOPT+=-Wuninitialized # not supported without optimization
115 .ELSE # "$(PRODUCT)"!=""
116 CFLAGSOPT= # no optimizing for non products
117 .ENDIF # "$(PRODUCT)"!=""
118 # Compiler flags for disabling optimizations
119 CFLAGSNOOPT=-O0
120 # Compiler flags for describing the output path
121 CFLAGSOUTOBJ=-o
123 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
124 CFLAGSWARNCC=-Wall -Wextra -Wendif-labels
125 CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \
126 -Wno-non-virtual-dtor
127 CFLAGSWALLCC=$(CFLAGSWARNCC)
128 CFLAGSWALLCXX=$(CFLAGSWARNCXX)
129 CFLAGSWERRCC=-Werror
131 # Once all modules on this platform compile without warnings, set
132 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
133 # settings.mk):
135 MODULES_WITH_WARNINGS := \
136 soldep \
139 # switches for dynamic and static linking
140 STATIC = -Wl,-Bstatic
141 DYNAMIC = -Wl,-Bdynamic
143 # name of linker
144 LINK*=$(CXX)
145 LINKC*=$(CC)
147 # default linker flags
148 LINKFLAGSDEFS*=-Wl,-z,defs
149 LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\'
150 LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\'
151 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
152 LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
153 LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\'
154 LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
155 LINKFLAGSRUNPATH_OXT=
156 LINKFLAGSRUNPATH_NONE=
157 LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS)
158 .IF "$(HAVE_LD_BSYMBOLIC_FUNCTIONS)" == "TRUE"
159 LINKFLAGS += -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo
160 .ENDIF
162 .IF "$(HAVE_LD_HASH_STYLE)" == "TRUE"
163 LINKFLAGS += -Wl,--hash-style=$(WITH_LINKER_HASH_STYLE)
164 .ELSE
165 LINKFLAGS += -Wl,-zdynsort
166 .ENDIF
167 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
168 LINKFLAGS += -Wl,--as-needed
169 .ENDIF
171 # linker flags for linking applications
172 LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec \
173 -Wl,-rpath-link,$(LB):$(SOLARLIBDIR)
174 LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec \
175 -Wl,-rpath-link,$(LB):$(SOLARLIBDIR)
177 # linker flags for linking shared libraries
178 LINKFLAGSSHLGUI= -shared
179 LINKFLAGSSHLCUI= -shared
181 LINKFLAGSTACK=
182 LINKFLAGSPROF=
183 LINKFLAGSDEBUG=-g
184 LINKFLAGSOPT=
186 # linker flags for optimization (symbol hashtable)
187 # for now, applied to symbol scoped libraries, only
188 LINKFLAGSOPTIMIZE*=-Wl,-O1
189 LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
191 SONAME_SWITCH=-Wl,-h
193 # Sequence of libs does matter !
195 STDLIBCPP=-lstdc++
197 # default objectfilenames to link
198 STDOBJVCL=$(L)/salmain.o
199 STDOBJGUI=
200 STDSLOGUI=
201 STDOBJCUI=
202 STDSLOCUI=
204 # libraries for linking applications
205 STDLIBGUIMT+=-Wl,--as-needed -lX11 -ldl -lpthread -lm -Wl,--no-as-needed
206 STDLIBCUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed
207 # libraries for linking shared libraries
208 STDSHLGUIMT+=-Wl,--as-needed -lX11 -lXext -ldl -lpthread -lm -Wl,--no-as-needed
209 STDSHLCUIMT+=-Wl,--as-needed -ldl -lpthread -lm -Wl,--no-as-needed
211 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
213 .IF "$(USE_STLP_DEBUG)" != ""
214 .IF "$(STLPORT_VER)" >= "500"
215 LIBSTLPORT=$(DYNAMIC) -lstlportstlg
216 LIBSTLPORTST=$(STATIC) -lstlportstlg $(DYNAMIC)
217 .ELSE
218 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
219 LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
220 .ENDIF
221 .ELSE # "$(USE_STLP_DEBUG)" != ""
222 .IF "$(STLPORT_VER)" >= "500"
223 LIBSTLPORT=$(DYNAMIC) -lstlport
224 LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
225 .ELSE
226 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
227 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
228 .ENDIF
229 .ENDIF # "$(USE_STLP_DEBUG)" != ""
231 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
233 # name of library manager
234 LIBMGR=ar
235 LIBFLAGS=-r
237 # tool for generating import libraries
238 IMPLIB=
239 IMPLIBFLAGS=
241 MAPSYM=
242 MAPSYMFLAGS=
244 RC=irc
245 RCFLAGS=-fo$@ $(RCFILES)
246 RCLINK=
247 RCLINKFLAGS=
248 RCSETVERSION=
250 # platform specific identifier for shared libs
251 DLLPOSTFIX=lx
252 DLLPRE=lib
253 DLLPOST=.so
254 PCHPOST=.gch