1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: unxlngppc.mk,v $
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>
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)"!=""
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
66 # name of C++ Compiler
71 .IF
"$(ENABLE_SYMBOLS)" == "SMALL"
72 CFLAGSENABLESYMBOLS
=-g1
74 CFLAGSENABLESYMBOLS
=-g
76 .IF
"$(HAVE_LD_HASH_STYLE)" == "TRUE"
77 LINKFLAGS
+= -Wl
,--hash-style
=$(WITH_LINKER_HASH_STYLE
)
79 LINKFLAGS
+= -Wl
,-zdynsort
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
)
93 #Note: the build is not consistent in that it links static librtaries
94 # libraries into dynamic libraries in places, so use -fPIC throughout
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
109 # Compiler flags for debugging
113 # Compiler flags for enabling optimizations
114 CFLAGSOPT
=-O2
-fno-schedule-insns
-fno-strict-aliasing
-fno-schedule-insns2
116 # Compiler flags for disabling optimizations
119 # Compiler flags for describing the output path
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
129 # switches for dynamic and static linking
130 STATIC
= -Wl
,-Bstatic
131 DYNAMIC
= -Wl
,-Bdynamic
136 # default linker flags
137 LINKFLAGS
=-Wl
,-rpath
,\''$$ORIGIN'\'
138 .IF
"$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
139 LINKFLAGS
+= -Wl
,--as-needed
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
155 .IF
"$(NO_BSYMBOLIC)"==""
156 .IF
"$(PRJNAME)" != "envtest"
157 LINKFLAGSSHLGUI
+=-Wl
,-Bsymbolic
158 LINKFLAGSSHLCUI
+=-Wl
,-Bsymbolic
160 .ENDIF
# "$(NO_BSYMBOLIC)"==""
162 LINKVERSIONMAPFLAG
=-Wl
,--version-script
166 # Sequence of libs does matter !
170 # default objectfilenames to link
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
)
187 LIBSTLPORT
=$(DYNAMIC
) -lstlport_gcc
188 LIBSTLPORTST
=$(STATIC
) -lstlport_gcc
$(DYNAMIC
)
191 # name of library manager
195 # tool for generating import libraries
203 RCFLAGS
=-fo
$@
$(RCFILES
)
208 # platform specific identifier for shared libs