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: unxbsds.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 #*************************************************************************
34 AFLAGS
=-Wa
,-Av8plusa
,-K
,PIC
-x assembler-with-cpp
-c
$(CDEFS
)
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
+=-D_PTHREADS
-D_REENTRANT
-DNEW_SOLAR
-D_USE_NAMESPACE
=1 -DSTLPORT_VERSION
=$(STLPORT_VER
) -DOSL_USE_SYS_V_SEMAPHORE
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
66 # flags for the C++ Compiler
67 CFLAGSCC
= -pipe
$(ARCH_FLAGS
)
69 # Flags for enabling exception handling
70 CFLAGSEXCEPTIONS
=-fexceptions
71 # Flags for disabling exception handling
72 CFLAGS_NO_EXCEPTIONS
=-fno-exceptions
74 CFLAGSCXX
= -pipe
$(ARCH_FLAGS
)
77 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
78 CFLAGSOBJGUIMT
=$(PICSWITCH
)
79 # Compiler flags for compiling static object in multi threaded environment with character user interface
80 CFLAGSOBJCUIMT
=$(PICSWITCH
)
81 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
82 CFLAGSSLOGUIMT
=$(PICSWITCH
)
83 # Compiler flags for compiling shared object in multi threaded environment with character user interface
84 CFLAGSSLOCUIMT
=$(PICSWITCH
)
85 # Compiler flags for profiling
87 # Compiler flags for debugging
90 # Compiler flags for enabling optimizations
92 # Compiler flags for disabling optimizations
94 # Compiler flags for describing the output path
98 CFLAGSWARNCXX
=$(CFLAGSWARNCC
) -Wno-ctor-dtor-privacy
99 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
100 CFLAGSWALLCC
=-Wall
-Wextra
-Wendif-labels
101 CFLAGSWALLCXX
=$(CFLAGSWALLCC
) -Wshadow
-Wno-ctor-dtor-privacy
104 # switches for dynamic and static linking
105 STATIC
= -Wl
,-Bstatic
106 DYNAMIC
= -Wl
,-Bdynamic
110 # default linker flags
113 # linker flags for linking applications
114 LINKFLAGSAPPGUI
= -Wl
,-export-dynamic
115 LINKFLAGSAPPCUI
= -Wl
,-export-dynamic
116 # linker flags for linking shared libraries
117 LINKFLAGSSHLGUI
= -shared
118 LINKFLAGSSHLCUI
= -shared
125 .IF
"$(NO_BSYMBOLIC)"==""
126 .IF
"$(PRJNAME)" != "envtest"
127 LINKFLAGSSHLGUI
+=-Wl
,-Bsymbolic
128 LINKFLAGSSHLCUI
+=-Wl
,-Bsymbolic
130 .ENDIF
# "$(NO_BSYMBOLIC)"==""
132 LINKVERSIONMAPFLAG
=-Wl
,--version-script
134 # Sequence of libs does matter !
138 # default objectfilenames to link
144 # libraries for linking applications
145 STDLIBGUIMT
=-lX11
-lpthread
-lm
146 STDLIBCUIMT
=-lpthread
-lm
147 # libraries for linking shared libraries
148 STDSHLGUIMT
=-lX11
-lXext
-lpthread
-lm
149 STDSHLCUIMT
=-lpthread
-lm
151 # STLport always needs pthread. This may yield some redundant -lpthread
152 # but that doesn't matter.
153 .IF
"$(STLPORT_VER)" >= "500"
154 LIBSTLPORT
=$(DYNAMIC
) -lstlport
-lpthread
155 LIBSTLPORTST
=$(STATIC
) -lstlport
$(DYNAMIC
) -lpthread
157 LIBSTLPORT
=$(DYNAMIC
) -lstlport_gcc
-lpthread
158 LIBSTLPORTST
=$(STATIC
) -lstlport_gcc
$(DYNAMIC
) -lpthread
162 # name of library manager
166 # tool for generating import libraries
174 RCFLAGS
=-fo
$@
$(RCFILES
)
179 # platform specific identifier for shared libs