update dev300-m58
[ooovba.git] / solenv / inc / unxlngr.mk
blobed4048748a5d095371bcb6947bb43e5a5406ecd7
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: unxlngr.mk,v $
11 # $Revision: 1.20 $
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 # unxlngr.mk for armv4l
34 # mk file for unxlngr
35 ASM=
36 AFLAGS=
38 SOLAR_JAVA*=
39 JAVAFLAGSDEBUG=-g
41 # filter for supressing verbose messages from linker
42 #not needed at the moment
43 #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
45 # _PTHREADS is needed for the stl
46 CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DARM32 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER)
48 # enable visibility define in "sal/types.h"
49 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
50 CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
51 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
53 # this is a platform with JAVA support
54 .IF "$(SOLAR_JAVA)"!=""
55 JAVADEF=-DSOLAR_JAVA
56 .IF "$(debug)"==""
57 JAVA_RUNTIME=-ljava
58 .ELSE
59 JAVA_RUNTIME=-ljava_g
60 .ENDIF
61 .ENDIF
63 # architecture dependent flags for the C and C++ compiler that can be changed by
64 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
65 ARCH_FLAGS*=
67 # name of C++ Compiler
68 CXX*=g++
69 # name of C Compiler
70 CC*=gcc
71 .IF "$(SYSBASE)"!=""
72 CFLAGS_SYSBASE:=-isystem $(SYSBASE)/usr/include
73 CXX+:=$(CFLAGS_SYSBASE)
74 CC+:=$(CFLAGS_SYSBASE)
75 .ENDIF # "$(SYSBASE)"!=""
76 CFLAGS+=-Wreturn-type -fmessage-length=0 -c
77 # flags to enable build with symbols; required for crashdump feature
78 .IF "$(ENABLE_SYMBOLS)"=="SMALL"
79 CFLAGSENABLESYMBOLS=-g1
80 .ELSE
81 CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta
83 .ENDIF
85 CFLAGS+=-fno-omit-frame-pointer
86 # flags for the C++ Compiler
87 CFLAGSCC= -pipe $(ARCH_FLAGS)
88 # Flags for enabling exception handling
89 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
90 # Flags for disabling exception handling
91 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
93 CFLAGSCXX= -pipe $(ARCH_FLAGS)
94 CFLAGSCXX+= -Wno-ctor-dtor-privacy
95 CFLAGSCXX+= -fno-use-cxa-atexit
96 PICSWITCH:=-fpic
97 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
98 CFLAGSCXX += -fvisibility-inlines-hidden
99 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
101 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
102 CFLAGSOBJGUIMT=
103 # Compiler flags for compiling static object in multi threaded environment with character user interface
104 CFLAGSOBJCUIMT=
105 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
106 CFLAGSSLOGUIMT=$(PICSWITCH)
107 # Compiler flags for compiling shared object in multi threaded environment with character user interface
108 CFLAGSSLOCUIMT=$(PICSWITCH)
109 # Compiler flags for profiling
110 CFLAGSPROF=
111 # Compiler flags for debugging
112 CFLAGSDEBUG=-g
113 CFLAGSDBGUTIL=
114 # Compiler flags for enabling optimizations
115 .IF "$(PRODUCT)"!=""
116 CFLAGSOPT=-Os -fno-strict-aliasing # optimizing for products
117 CFLAGSOPT+=-Wuninitialized # not supported without optimization
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
125 # Enable all warnings
126 CFLAGSWALL=-Wall
127 # Set default warn level
128 CFLAGSDFLTWARN=
130 # switches for dynamic and static linking
131 STATIC = -Wl,-Bstatic
132 DYNAMIC = -Wl,-Bdynamic
134 # name of linker
135 LINK*=$(CXX)
136 LINKC*=$(CC)
138 # default linker flags
139 LINKFLAGSDEFS*=-Wl,-z,defs
140 LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\'
141 LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\'
142 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
143 LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
144 LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
145 LINKFLAGSRUNPATH_OXT=
146 LINKFLAGSRUNPATH_NONE=
147 LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS)
148 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
149 LINKFLAGS += -Wl,--as-needed
150 .ENDIF
152 # linker flags for linking applications
153 LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
154 LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
155 # linker flags for linking shared libraries
156 LINKFLAGSSHLGUI= -shared
157 LINKFLAGSSHLCUI= -shared
159 LINKFLAGSTACK=
160 LINKFLAGSPROF=
161 LINKFLAGSDEBUG=-g
162 LINKFLAGSOPT=
164 # linker flags for optimization (symbol hashtable)
165 # for now, applied to symbol scoped libraries, only
166 LINKFLAGSOPTIMIZE*=-Wl,-O1
167 LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
169 SONAME_SWITCH=-Wl,-h
171 # Sequence of libs does matter !
173 STDLIBCPP=-lstdc++
175 # default objectfilenames to link
176 STDOBJVCL=$(L)/salmain.o
177 STDOBJGUI=
178 STDSLOGUI=
179 STDOBJCUI=
180 STDSLOCUI=
182 # libraries for linking applications
183 STDLIBGUIMT=-lX11 -ldl -lpthread -lm
184 STDLIBCUIMT=-ldl -lpthread -lm
185 # libraries for linking shared libraries
186 STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm
187 STDSHLCUIMT=-ldl -lpthread -lm
189 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
191 .IF "$(USE_STLP_DEBUG)" != ""
192 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
193 LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
194 .ELSE # "$(USE_STLP_DEBUG)" != ""
195 .IF "$(STLPORT_VER)" >= "500"
196 LIBSTLPORT=$(DYNAMIC) -lstlport
197 LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
198 .ELSE
199 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
200 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
201 .ENDIF
202 .ENDIF # "$(USE_STLP_DEBUG)" != ""
204 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
206 # name of library manager
207 LIBMGR=ar
208 LIBFLAGS=-r
210 # tool for generating import libraries
211 IMPLIB=
212 IMPLIBFLAGS=
214 MAPSYM=
215 MAPSYMFLAGS=
217 RC=irc
218 RCFLAGS=-fo$@ $(RCFILES)
219 RCLINK=
220 RCLINKFLAGS=
221 RCSETVERSION=
223 # platform specific identifier for shared libs
224 DLLPOSTFIX=lr
225 DLLPRE=lib
226 DLLPOST=.so