update dev300-m58
[ooovba.git] / solenv / inc / unxlngppc4.mk
blobc6393770165b99f43b0a508241a23c09ba7c3324
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: unxlngppc4.mk,v $
11 # $Revision: 1.34 $
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 linux ppc using gcc 3.X
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 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) -DPOWERPC -DPPC
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*=
64 # name of C++ Compiler
65 CXX*=g++
66 # name of C Compiler
67 CC*=gcc
69 CFLAGS+=-fmessage-length=0 -c
71 # flags for the C++ Compiler
72 CFLAGSCC= -pipe $(ARCH_FLAGS)
74 # Flags for enabling exception handling
75 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
77 # Flags for disabling exception handling
78 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
80 CFLAGSCXX= -pipe -frtti $(ARCH_FLAGS)
81 PICSWITCH:=-fPIC
83 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
84 CFLAGSOBJGUIMT=$(PICSWITCH)
85 # Compiler flags for compiling static object in multi threaded environment with character user interface
86 CFLAGSOBJCUIMT=$(PICSWITCH)
87 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
88 CFLAGSSLOGUIMT=$(PICSWITCH)
89 # Compiler flags for compiling shared object in multi threaded environment with character user interface
90 CFLAGSSLOCUIMT=$(PICSWITCH)
92 # Compiler flags for profiling
93 CFLAGSPROF=
95 # Compiler flags for debugging
96 CFLAGSDEBUG=-g
97 .IF "$(ENABLE_SYMBOLS)" == "SMALL"
98 CFLAGSENABLESYMBOLS=-g1
99 .ELSE
100 CFLAGSENABLESYMBOLS=-g
101 .ENDIF
102 CFLAGSDBGUTIL=
104 # Compiler flags for enabling optimizations
105 CFLAGSOPT=-Os -fno-strict-aliasing
107 # Compiler flags for disabling optimizations
108 # don't change - required to work around optimization bugs
109 CFLAGSNOOPT=-O0
111 # Compiler flags for describing the output path
112 CFLAGSOUTOBJ=-o
114 CFLAGSWARNCC=
115 CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
116 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
117 CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
118 CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
119 CFLAGSWERRCC=-Werror
121 # switches for dynamic and static linking
122 STATIC = -Wl,-Bstatic
123 DYNAMIC = -Wl,-Bdynamic
125 # name of linker
126 LINK*=$(CXX)
127 LINKC*=$(CC)
129 # default linker flags
131 LINKFLAGSDEFS*=
132 LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\'
133 LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\'
134 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
135 LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
136 LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\'
137 LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
138 LINKFLAGSRUNPATH_OXT=
139 LINKFLAGSRUNPATH_NONE=
140 LINKFLAGS= $(LINKFLAGSDEFS)
141 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
142 LINKFLAGS += -Wl,--as-needed
143 .ENDIF
145 # linker flags for linking applications
146 LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
147 LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
149 # linker flags for linking shared libraries
150 LINKFLAGSSHLGUI= -shared
151 LINKFLAGSSHLCUI= -shared
153 LINKFLAGSTACK=
154 LINKFLAGSPROF=
155 LINKFLAGSDEBUG=-g
156 LINKFLAGSOPT=
158 .IF "$(NO_BSYMBOLIC)"==""
159 .IF "$(PRJNAME)" != "envtest"
160 LINKFLAGSSHLGUI+=-Wl,-Bsymbolic
161 LINKFLAGSSHLCUI+=-Wl,-Bsymbolic
162 .ENDIF
163 .ENDIF # "$(NO_BSYMBOLIC)"==""
165 LINKVERSIONMAPFLAG=-Wl,--version-script
167 SONAME_SWITCH=-Wl,-h
169 # Sequence of libs does matter !
171 STDLIBCPP=-lstdc++
173 # default objectfilenames to link
174 STDOBJVCL=$(L)/salmain.o
175 STDOBJGUI=
176 STDSLOGUI=
177 STDOBJCUI=
178 STDSLOCUI=
180 # libraries for linking applications
181 STDLIBGUIMT=-lX11 -ldl -lpthread -lm
182 STDLIBCUIMT=-ldl -lpthread -lm
183 # libraries for linking shared libraries
184 STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm
185 STDSHLCUIMT=-ldl -lpthread -lm
187 .IF "$(STLPORT_VER)" >= "500"
188 LIBSTLPORT=$(DYNAMIC) -lstlport -lstdc++
189 LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
190 .ELSE
191 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
192 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
193 .ENDIF
195 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
197 # name of library manager
198 LIBMGR=ar
199 LIBFLAGS=-r
201 # tool for generating import libraries
202 IMPLIB=
203 IMPLIBFLAGS=
205 MAPSYM=
206 MAPSYMFLAGS=
208 RC=irc
209 RCFLAGS=-fo$@ $(RCFILES)
210 RCLINK=
211 RCLINKFLAGS=
212 RCSETVERSION=
214 # platform specific identifier for shared libs
215 DLLPOSTFIX=lp
216 DLLPRE=lib
217 DLLPOST=.so