update dev300-m57
[ooovba.git] / solenv / inc / unxlngi4.mk
blob16fd30186dabd13063f6cb34f07486f77780ad44
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: unxlngi4.mk,v $
11 # $Revision: 1.49 $
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 #*************************************************************************
31 # mk file for unxlngi4
32 ASM=
33 AFLAGS=
35 SOLAR_JAVA*=
36 JAVAFLAGSDEBUG=-g
38 # filter for supressing verbose messages from linker
39 #not needed at the moment
40 #LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter"
42 # _PTHREADS is needed for the stl
43 CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER)
45 # enable visibility define in "sal/types.h"
46 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
47 CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
48 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
50 # this is a platform with JAVA support
51 .IF "$(SOLAR_JAVA)"!=""
52 JAVADEF=-DSOLAR_JAVA
53 .IF "$(debug)"==""
54 JAVA_RUNTIME=-ljava
55 .ELSE
56 JAVA_RUNTIME=-ljava_g
57 .ENDIF
58 .ENDIF
60 # architecture dependent flags for the C and C++ compiler that can be changed by
61 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
62 ARCH_FLAGS*=-mcpu=pentiumpro
64 # name of C++ Compiler
65 CXX*=g++
66 # name of C Compiler
67 CC*=gcc
68 # flags for C and C++ Compiler
69 CFLAGS+=-fmessage-length=0 -c
71 # flags to enable build with symbols; required for crashdump feature
72 .IF "$(ENABLE_SYMBOLS)"=="SMALL"
73 CFLAGSENABLESYMBOLS=-g1
74 .ELSE
75 CFLAGSENABLESYMBOLS=-g
76 .ENDIF
78 # flags for the C++ Compiler
79 CFLAGSCC= -pipe $(ARCH_FLAGS)
80 # Flags for enabling exception handling
81 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
82 # Flags for disabling exception handling
83 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
85 CFLAGSCXX= -pipe $(ARCH_FLAGS)
87 # HACK: enable Hamburg developers to build on glibc-2.2 machines but compile vs. glibc-2.1 headers
88 .IF "$(BUILD_SPECIAL)"==""
89 CFLAGSCXX+=-include preinclude.h
90 .ENDIF
91 PICSWITCH:=-fpic
93 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
94 CFLAGSOBJGUIMT=
95 # Compiler flags for compiling static object in multi threaded environment with character user interface
96 CFLAGSOBJCUIMT=
97 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
98 CFLAGSSLOGUIMT=$(PICSWITCH)
99 # Compiler flags for compiling shared object in multi threaded environment with character user interface
100 CFLAGSSLOCUIMT=$(PICSWITCH)
101 # Compiler flags for profiling
102 CFLAGSPROF=
103 # Compiler flags for debugging
104 CFLAGSDEBUG=-g
105 CFLAGSDBGUTIL=
106 # Compiler flags for enabling optimizations
107 # CFLAGSOPT=-O2
108 # reduce to -O1 to avoid optimization problems
109 CFLAGSOPT=-O1
110 # Compiler flags for disabling optimizations
111 CFLAGSNOOPT=-O0
112 # Compiler flags for describing the output path
113 CFLAGSOUTOBJ=-o
115 CFLAGSWARNCC=
116 .IF "$(PRODUCT)"!=""
117 CFLAGSWARNCC+=-Wuninitialized # not supported without optimization
118 .ENDIF
119 CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
120 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
121 CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
122 CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
123 CFLAGSWERRCC=-Werror
125 # switches for dynamic and static linking
126 STATIC = -Wl,-Bstatic
127 DYNAMIC = -Wl,-Bdynamic
129 # name of linker
130 LINK*=$(CXX)
131 LINKC*=$(CC)
133 # default linker flags
134 LINKFLAGSDEFS*=-Wl,-z,defs
135 LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\'
136 LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\'
137 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
138 LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
139 LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\'
140 LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
141 LINKFLAGSRUNPATH_OXT=
142 LINKFLAGSRUNPATH_NONE=
143 LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS)
144 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
145 LINKFLAGS += -Wl,--as-needed
146 .ENDIF
148 # linker flags for linking applications
149 LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
150 LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
152 # linker flags for linking shared libraries
153 LINKFLAGSSHLGUI= -shared
154 LINKFLAGSSHLCUI= -shared
156 LINKFLAGSTACK=
157 LINKFLAGSPROF=
158 LINKFLAGSDEBUG=-g
159 LINKFLAGSOPT=
161 # linker flags for optimization (symbol hashtable)
162 # for now, applied to symbol scoped libraries, only
163 LINKFLAGSOPTIMIZE*=-Wl,-O1
164 LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
166 SONAME_SWITCH=-Wl,-h
168 # Sequence of libs does matter !
170 STDLIBCPP=-lstdc++
172 # default objectfilenames to link
173 STDOBJVCL=$(L)$/salmain.o
174 STDOBJGUI=
175 STDSLOGUI=
176 STDOBJCUI=
177 STDSLOCUI=
179 .IF "$(ALLOC)" == "TCMALLOC"
180 STDLIBGUIMT+=-ltcmalloc
181 STDLIBCUIMT+=-ltcmalloc
182 STDSHLGUIMT+=-ltcmalloc
183 STDSHLCUIMT+=-ltcmalloc
184 .ENDIF
186 # libraries for linking applications
187 STDLIBGUIMT+=-lX11 -ldl -lpthread -lm
188 STDLIBCUIMT+=-ldl -lpthread -lm
189 # libraries for linking shared libraries
190 STDSHLGUIMT+=-lX11 -lXext -ldl -lpthread -lm
191 STDSHLCUIMT+=-ldl -lpthread -lm
193 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
195 .IF "$(STLPORT_VER)" >= "500"
196 LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++
197 LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
198 .ELSE
199 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
200 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
201 .ENDIF
203 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
205 # name of library manager
206 LIBMGR=ar
207 LIBFLAGS=-r
209 # tool for generating import libraries
210 IMPLIB=
211 IMPLIBFLAGS=
213 MAPSYM=
214 MAPSYMFLAGS=
216 RC=irc
217 RCFLAGS=-fo$@ $(RCFILES)
218 RCLINK=
219 RCLINKFLAGS=
220 RCSETVERSION=
222 # platform specific identifier for shared libs
223 DLLPOSTFIX=li
224 DLLPRE=lib
225 DLLPOST=.so