update dev300-m58
[ooovba.git] / solenv / inc / unxlngppc.mk
blob00c37abc28206ded6cc0aeb7ba21ed12b353eb1a
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: unxlngppc.mk,v $
11 # $Revision: 1.30 $
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 # Makefile for linux-ppc
33 # Christer Gustavsson <cg@nocrew.org>
34 ASM=
35 AFLAGS=
37 SOLAR_JAVA*=
38 JAVAFLAGSDEBUG=-g
40 # filter for supressing verbose messages from linker
41 #not needed at the moment
42 #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
44 # _PTHREADS is needed for the stl
45 CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=$(STLPORT_VER) -DPOWERPC -DPPC
47 # enable visibility define in "sal/types.h"
48 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
49 CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
50 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
52 # this is a platform with JAVA support
53 .IF "$(SOLAR_JAVA)"!=""
54 JAVADEF=-DSOLAR_JAVA
55 .IF "$(debug)"==""
56 JAVA_RUNTIME=-ljava
57 .ELSE
58 JAVA_RUNTIME=-ljava_g
59 .ENDIF
60 .ENDIF
62 # architecture dependent flags for the C and C++ compiler that can be changed by
63 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
64 ARCH_FLAGS*=
66 # name of C++ Compiler
67 CXX*=g++
68 # name of C Compiler
69 CC*=gcc
71 .IF "$(ENABLE_SYMBOLS)" == "SMALL"
72 CFLAGSENABLESYMBOLS=-g1
73 .ELSE
74 CFLAGSENABLESYMBOLS=-g
75 .ENDIF
76 .IF "$(HAVE_LD_HASH_STYLE)" == "TRUE"
77 LINKFLAGS += -Wl,--hash-style=$(WITH_LINKER_HASH_STYLE)
78 .ELSE
79 LINKFLAGS += -Wl,-zdynsort
80 .ENDIF
82 CFLAGS=-nostdinc -c
83 CFLAGSCC=$(ARCH_FLAGS)
85 # Flags for enabling exception handling
86 CFLAGSEXCEPTIONS=-fexceptions
87 # Flags for disabling exception handling
88 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
90 CFLAGSCXX= -pipe -frtti $(ARCH_FLAGS)
91 PICSWITCH:=-fPIC
93 #Note: the build is not consistent in that it links static librtaries
94 # libraries into dynamic libraries in places, so use -fPIC throughout
95 # until fixed.
97 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
98 CFLAGSOBJGUIMT=$(PICSWITCH)
99 # Compiler flags for compiling static object in multi threaded environment with character user interface
100 CFLAGSOBJCUIMT=$(PICSWITCH)
101 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
102 CFLAGSSLOGUIMT=$(PICSWITCH)
103 # Compiler flags for compiling shared object in multi threaded environment with character user interface
104 CFLAGSSLOCUIMT=$(PICSWITCH)
106 # Compiler flags for profiling
107 CFLAGSPROF=
109 # Compiler flags for debugging
110 CFLAGSDEBUG=-g
111 CFLAGSDBGUTIL=
113 # Compiler flags for enabling optimizations
114 CFLAGSOPT=-O2 -fno-schedule-insns -fno-strict-aliasing -fno-schedule-insns2
116 # Compiler flags for disabling optimizations
117 CFLAGSNOOPT=-O0
119 # Compiler flags for describing the output path
120 CFLAGSOUTOBJ=-o
122 CFLAGSWARNCC=
123 CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy
124 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
125 CFLAGSWALLCC=-Wall -Wextra -Wendif-labels
126 CFLAGSWALLCXX=$(CFLAGSWALLCC) -Wshadow -Wno-ctor-dtor-privacy
127 CFLAGSWERRCC=-Werror
129 # switches for dynamic and static linking
130 STATIC = -Wl,-Bstatic
131 DYNAMIC = -Wl,-Bdynamic
133 # name of linker
134 LINK*=$(CXX)
135 LINKC*=$(CC)
136 # default linker flags
137 LINKFLAGS=-Wl,-rpath,\''$$ORIGIN'\'
138 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
139 LINKFLAGS += -Wl,--as-needed
140 .ENDIF
143 # linker flags for linking applications
144 LINKFLAGSAPPGUI= -Wl,-export-dynamic
145 LINKFLAGSAPPCUI= -Wl,-export-dynamic
146 # linker flags for linking shared libraries
147 LINKFLAGSSHLGUI= -shared
148 LINKFLAGSSHLCUI= -shared
150 LINKFLAGSTACK=
151 LINKFLAGSPROF=
152 LINKFLAGSDEBUG=-g
153 LINKFLAGSOPT=
155 .IF "$(NO_BSYMBOLIC)"==""
156 .IF "$(PRJNAME)" != "envtest"
157 LINKFLAGSSHLGUI+=-Wl,-Bsymbolic
158 LINKFLAGSSHLCUI+=-Wl,-Bsymbolic
159 .ENDIF
160 .ENDIF # "$(NO_BSYMBOLIC)"==""
162 LINKVERSIONMAPFLAG=-Wl,--version-script
164 SONAME_SWITCH=-Wl,-h
166 # Sequence of libs does matter !
168 STDLIBCPP=-lstdc++
170 # default objectfilenames to link
171 STDOBJGUI=
172 STDSLOGUI=
173 STDOBJCUI=
174 STDSLOCUI=
176 # libraries for linking applications
177 STDLIBGUIMT=-lX11 -ldl -lpthread -lm
178 STDLIBCUIMT=-ldl -lpthread -lm
179 # libraries for linking shared libraries
180 STDSHLGUIMT=-lX11 -lXext -ldl -lpthread -lm
181 STDSHLCUIMT=-ldl -lpthread -lm
183 .IF "$(STLPORT_VER)" >= "500"
184 LIBSTLPORT=$(DYNAMIC) -lstlport
185 LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
186 .ELSE
187 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
188 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
189 .ENDIF
191 # name of library manager
192 LIBMGR=ar
193 LIBFLAGS=-r
195 # tool for generating import libraries
196 IMPLIB=
197 IMPLIBFLAGS=
199 MAPSYM=
200 MAPSYMFLAGS=
202 RC=irc
203 RCFLAGS=-fo$@ $(RCFILES)
204 RCLINK=
205 RCLINKFLAGS=
206 RCSETVERSION=
208 # platform specific identifier for shared libs
209 DLLPOSTFIX=lp
210 DLLPRE=lib
211 DLLPOST=.so