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: unxlngr.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 # unxlngr.mk for armv4l
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)"!=""
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
67 # name of C++ Compiler
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
81 CFLAGSENABLESYMBOLS
=-g
# was temporarily commented out, reenabled before Beta
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
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
103 # Compiler flags for compiling static object in multi threaded environment with character user interface
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
111 # Compiler flags for debugging
114 # Compiler flags for enabling optimizations
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
123 # Compiler flags for describing the output path
125 # Enable all warnings
127 # Set default warn level
130 # switches for dynamic and static linking
131 STATIC
= -Wl
,-Bstatic
132 DYNAMIC
= -Wl
,-Bdynamic
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
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
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
171 # Sequence of libs does matter !
175 # default objectfilenames to link
176 STDOBJVCL
=$(L
)/salmain.o
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
)
199 LIBSTLPORT
=$(DYNAMIC
) -lstlport_gcc
200 LIBSTLPORTST
=$(STATIC
) -lstlport_gcc
$(DYNAMIC
)
202 .ENDIF
# "$(USE_STLP_DEBUG)" != ""
204 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
206 # name of library manager
210 # tool for generating import libraries
218 RCFLAGS
=-fo
$@
$(RCFILES
)
223 # platform specific identifier for shared libs