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: unxlngppc4.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 #*************************************************************************
31 # mk file for linux ppc using gcc 3.X
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)"!=""
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
64 # name of C++ Compiler
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
)
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
95 # Compiler flags for debugging
97 .IF
"$(ENABLE_SYMBOLS)" == "SMALL"
98 CFLAGSENABLESYMBOLS
=-g1
100 CFLAGSENABLESYMBOLS
=-g
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
111 # Compiler flags for describing the output path
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
121 # switches for dynamic and static linking
122 STATIC
= -Wl
,-Bstatic
123 DYNAMIC
= -Wl
,-Bdynamic
129 # default linker flags
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
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
158 .IF
"$(NO_BSYMBOLIC)"==""
159 .IF
"$(PRJNAME)" != "envtest"
160 LINKFLAGSSHLGUI
+=-Wl
,-Bsymbolic
161 LINKFLAGSSHLCUI
+=-Wl
,-Bsymbolic
163 .ENDIF
# "$(NO_BSYMBOLIC)"==""
165 LINKVERSIONMAPFLAG
=-Wl
,--version-script
169 # Sequence of libs does matter !
173 # default objectfilenames to link
174 STDOBJVCL
=$(L
)/salmain.o
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
)
191 LIBSTLPORT
=$(DYNAMIC
) -lstlport_gcc
-lstdc
++
192 LIBSTLPORTST
=$(STATIC
) -lstlport_gcc
$(DYNAMIC
)
195 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
197 # name of library manager
201 # tool for generating import libraries
209 RCFLAGS
=-fo
$@
$(RCFILES
)
214 # platform specific identifier for shared libs