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: unxbsdi.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 #*************************************************************************
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
58 ARCH_FLAGS
*=-mpentiumpro
60 # name of C++ Compiler
64 # flags for C and C++ Compiler
66 # flags for the C++ Compiler
67 CFLAGSCC
= -pipe
$(ARCH_FLAGS
)
68 # Flags for enabling exception handling
69 CFLAGSEXCEPTIONS
=-fexceptions
70 # Flags for disabling exception handling
71 CFLAGS_NO_EXCEPTIONS
=-fno-exceptions
73 CFLAGSCXX
= -pipe
-frtti
$(ARCH_FLAGS
)
76 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
78 # Compiler flags for compiling static object in multi threaded environment with character user interface
80 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
81 CFLAGSSLOGUIMT
=$(PICSWITCH
)
82 # Compiler flags for compiling shared object in multi threaded environment with character user interface
83 CFLAGSSLOCUIMT
=$(PICSWITCH
)
84 # Compiler flags for profiling
86 # Compiler flags for debugging
89 # Compiler flags for enabling optimizations
91 # Compiler flags for disabling optimizations
93 # Compiler flags for describing the output path
97 CFLAGSWARNCXX
=$(CFLAGSWARNCC
) -Wno-ctor-dtor-privacy
98 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
99 CFLAGSWALLCC
=-Wall
-Wextra
-Wendif-labels
100 CFLAGSWALLCXX
=$(CFLAGSWALLCC
) -Wshadow
-Wno-ctor-dtor-privacy
103 # switches for dynamic and static linking
104 STATIC
= -Wl
,-Bstatic
105 DYNAMIC
= -Wl
,-Bdynamic
109 # default linker flags
111 .IF
"$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
112 LINKFLAGS
+= -Wl
,--as-needed
115 # linker flags for linking applications
116 LINKFLAGSAPPGUI
= -Wl
,-export-dynamic
117 LINKFLAGSAPPCUI
= -Wl
,-export-dynamic
119 # linker flags for linking shared libraries
120 LINKFLAGSSHLGUI
= -shared
121 LINKFLAGSSHLCUI
= -shared
128 .IF
"$(NO_BSYMBOLIC)"==""
129 .IF
"$(PRJNAME)" != "envtest"
130 LINKFLAGSSHLGUI
+=-Wl
,-Bsymbolic
131 LINKFLAGSSHLCUI
+=-Wl
,-Bsymbolic
133 .ENDIF
# "$(NO_BSYMBOLIC)"==""
135 LINKVERSIONMAPFLAG
=-Wl
,--version-script
139 # Sequence of libs does matter !
143 # default objectfilenames to link
149 # libraries for linking applications
150 STDLIBGUIMT
=-lX11
-lpthread
-lm
151 STDLIBCUIMT
=-lpthread
-lm
152 # libraries for linking shared libraries
153 STDSHLGUIMT
=-lX11
-lXext
-lpthread
-lm
154 STDSHLCUIMT
=-lpthread
-lm
156 .IF
"$(STLPORT_VER)" >= "500"
157 LIBSTLPORT
=$(DYNAMIC
) -lstlport
158 LIBSTLPORTST
=$(STATIC
) -lstlport
$(DYNAMIC
)
160 LIBSTLPORT
=$(DYNAMIC
) -lstlport_gcc
161 LIBSTLPORTST
=$(STATIC
) -lstlport_gcc
$(DYNAMIC
)
165 # name of library manager
169 # tool for generating import libraries
177 RCFLAGS
=-fo
$@
$(RCFILES
)
182 # platform specific identifier for shared libs