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: unxbsdi2.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 # mk file for unxbsdi2
39 # filter for supressing verbose messages from linker
40 #not needed at the moment
41 #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
43 # _PTHREADS is needed for the stl
44 CDEFS
+= -DX86
-D_PTHREADS
-D_REENTRANT
-DNEW_SOLAR
-D_USE_NAMESPACE
=1 -DSTLPORT_VERSION
=$(STLPORT_VER
)
46 # this is a platform with JAVA support
47 .IF
"$(SOLAR_JAVA)"!=""
56 # architecture dependent flags for the C and C++ compiler that can be changed by
57 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
60 # name of C++ Compiler
64 # flags for C and C++ Compiler
65 CFLAGS
+=-fmessage-length
=0 -c
67 # flags to enable build with symbols; required for crashdump feature
68 .IF
"$(ENABLE_SYMBOLS)"=="SMALL"
69 CFLAGSENABLESYMBOLS
=-g1
71 CFLAGSENABLESYMBOLS
=-g
74 # flags for the C++ Compiler
75 CFLAGSCC
= -pipe
$(ARCH_FLAGS
)
76 # Flags for enabling exception handling
77 CFLAGSEXCEPTIONS
=-fexceptions
-fno-enforce-eh-specs
78 # Flags for disabling exception handling
79 CFLAGS_NO_EXCEPTIONS
=-fno-exceptions
81 CFLAGSCXX
= -pipe
-frtti
$(ARCH_FLAGS
)
84 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
86 # Compiler flags for compiling static object in multi threaded environment with character user interface
88 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
89 CFLAGSSLOGUIMT
=$(PICSWITCH
)
90 # Compiler flags for compiling shared object in multi threaded environment with character user interface
91 CFLAGSSLOCUIMT
=$(PICSWITCH
)
92 # Compiler flags for profiling
94 # Compiler flags for debugging
97 # Compiler flags for enabling optimizations
99 # reduce to -O1 to avoid optimization problems
101 # Compiler flags for disabling optimizations
103 # Compiler flags for describing the output path
107 CFLAGSWARNCXX
=$(CFLAGSWARNCC
) -Wno-ctor-dtor-privacy
108 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
109 CFLAGSWALLCC
=-Wall
-Wextra
-Wendif-labels
110 CFLAGSWALLCXX
=$(CFLAGSWALLCC
) -Wshadow
-Wno-ctor-dtor-privacy
113 # switches for dynamic and static linking
114 STATIC
= -Wl
,-Bstatic
115 DYNAMIC
= -Wl
,-Bdynamic
120 # default linker flags
121 LINKFLAGSDEFS
*=-z defs
122 LINKFLAGSRUNPATH_URELIB
=-Wl
,-rpath
,\''$$ORIGIN'\'
123 LINKFLAGSRUNPATH_UREBIN
=-Wl
,-rpath
,\''$$ORIGIN/../lib:$$ORIGIN'\'
124 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
125 LINKFLAGSRUNPATH_OOO
=-Wl
,-rpath
,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
126 LINKFLAGSRUNPATH_SDK
=-Wl
,-rpath
,\''$$ORIGIN/../../ure-link/lib'\'
127 LINKFLAGSRUNPATH_BRAND
=-Wl
,-rpath
,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
128 LINKFLAGSRUNPATH_OXT
=
129 LINKFLAGSRUNPATH_NONE
=
130 LINKFLAGS
=-z combreloc
$(LINKFLAGSDEFS
)
131 .IF
"$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
132 LINKFLAGS
+= -Wl
,--as-needed
135 # linker flags for linking applications
136 LINKFLAGSAPPGUI
= -Wl
,-export-dynamic
137 LINKFLAGSAPPCUI
= -Wl
,-export-dynamic
139 # linker flags for linking shared libraries
140 LINKFLAGSSHLGUI
= -shared
141 LINKFLAGSSHLCUI
= -shared
148 # linker flags for optimization (symbol hashtable)
149 # for now, applied to symbol scoped libraries, only
150 LINKFLAGSOPTIMIZE
*=-Wl
,-O1
151 LINKVERSIONMAPFLAG
=$(LINKFLAGSOPTIMIZE
) -Wl
,--version-script
155 # Sequence of libs does matter !
159 # default objectfilenames to link
165 # libraries for linking applications
166 STDLIBGUIMT
=-lX11
-lpthread
-lm
167 STDLIBCUIMT
=-lpthread
-lm
168 # libraries for linking shared libraries
169 STDSHLGUIMT
=-lX11
-lXext
-lpthread
-lm
170 STDSHLCUIMT
=-lpthread
-lm
172 LIBSALCPPRT
*=-Wl
,--whole-archive
-lsalcpprt
-Wl
,--no-whole-archive
174 .IF
"$(STLPORT_VER)" >= "500"
175 LIBSTLPORT
=$(DYNAMIC
) -lstlport
-lstdc
++
176 LIBSTLPORTST
=$(STATIC
) -lstlport
$(DYNAMIC
)
178 LIBSTLPORT
=$(DYNAMIC
) -lstlport_gcc
-lstdc
++
179 LIBSTLPORTST
=$(STATIC
) -lstlport_gcc
$(DYNAMIC
)
182 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
184 # name of library manager
188 # tool for generating import libraries
196 RCFLAGS
=-fo
$@
$(RCFILES
)
201 # platform specific identifier for shared libs