update dev300-m58
[ooovba.git] / solenv / inc / unxfbsd.mk
blob8ae29f83b92c416fdd27b32af61d68cf162d5b13
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: unxfbsd.mk,v $
11 # $Revision: 1.10 $
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 # Makefile for FreeBSD.
34 ASM=
35 AFLAGS=
37 SOLAR_JAVA*=
38 JAVAFLAGSDEBUG=-g
40 # Include arch specific makefile.
41 .IF "$(CPUNAME)" == "INTEL"
42 .INCLUDE : unxfbsdi.mk
43 .ENDIF
44 .IF "$(CPUNAME)" == "X86_64"
45 .INCLUDE : unxfbsdx.mk
46 .ENDIF
48 # filter for supressing verbose messages from linker
49 #not needed at the moment
50 #LINKOUTPUT_FILTER=" |& $(SOLARENV)/bin/msg_filter"
52 # _PTHREADS is needed for the stl
53 CDEFS+=$(PTHREAD_CFLAGS) -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=450
55 # enable visibility define in "sal/types.h"
56 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
57 CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
58 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
60 # this is a platform with JAVA support
61 .IF "$(SOLAR_JAVA)"!=""
62 JAVADEF=-DSOLAR_JAVA
63 .IF "$(debug)"==""
64 JAVA_RUNTIME=-ljava
65 .ELSE
66 JAVA_RUNTIME=-ljava_g
67 .ENDIF
68 .ENDIF
70 # name of C++ Compiler
71 CXX*=g++
72 # name of C Compiler
73 CC*=gcc
74 .IF "$(SYSBASE)"!=""
75 CFLAGS_SYSBASE:=-isystem $(SYSBASE)/usr/include
76 CXX+:=$(CFLAGS_SYSBASE)
77 CC+:=$(CFLAGS_SYSBASE)
78 .ENDIF # "$(SYSBASE)"!=""
79 CFLAGS+=-fmessage-length=0 -c
81 # flags to enable build with symbols; required for crashdump feature
82 .IF "$(ENABLE_SYMBOLS)"=="SMALL"
83 CFLAGSENABLESYMBOLS=-g1
84 .ELSE
85 CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta
87 .ENDIF
89 # flags for the C++ Compiler
90 CFLAGSCC= -pipe $(ARCH_FLAGS)
91 # Flags for enabling exception handling
92 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
93 # Flags for disabling exception handling
94 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
96 # -fpermissive should be removed as soon as possible
97 CFLAGSCXX= -pipe $(ARCH_FLAGS)
98 PICSWITCH:=-fpic
99 .IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
100 CFLAGSCXX += -fvisibility-inlines-hidden
101 .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
103 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
104 CFLAGSOBJGUIMT=
105 # Compiler flags for compiling static object in multi threaded environment with character user interface
106 CFLAGSOBJCUIMT=
107 # Compiler flags for compiling shared object in multi threaded environment with graphical user interface
108 CFLAGSSLOGUIMT=$(PICSWITCH)
109 # Compiler flags for compiling shared object in multi threaded environment with character user interface
110 CFLAGSSLOCUIMT=$(PICSWITCH)
111 # Compiler flags for profiling
112 CFLAGSPROF=
113 # Compiler flags for debugging
114 CFLAGSDEBUG=-g
115 CFLAGSDBGUTIL=
116 # Compiler flags for disabling optimizations
117 CFLAGSNOOPT=-O0
118 # Compiler flags for describing the output path
119 CFLAGSOUTOBJ=-o
121 # -Wshadow does not work for C with nested uses of pthread_cleanup_push:
122 CFLAGSWARNCC=-Wall -Wextra -Wendif-labels
123 CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \
124 -Wno-non-virtual-dtor
125 CFLAGSWALLCC=$(CFLAGSWARNCC)
126 CFLAGSWALLCXX=$(CFLAGSWARNCXX)
127 CFLAGSWERRCC=-Werror
129 # Once all modules on this platform compile without warnings, set
130 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
131 # settings.mk): Currently this is not tested on FreeBSD
132 #MODULES_WITH_WARNINGS :=
134 # switches for dynamic and static linking
135 STATIC = -Wl,-Bstatic
136 DYNAMIC = -Wl,-Bdynamic
138 # name of linker
139 LINK*=$(CXX)
140 LINKC*=$(CC)
142 # default linker flags
143 LINKFLAGSDEFS*=#-Wl,-z,defs
144 LINKFLAGSRUNPATH_URELIB=-Wl,-rpath,\''$$ORIGIN'\'
145 LINKFLAGSRUNPATH_UREBIN=-Wl,-rpath,\''$$ORIGIN/../lib:$$ORIGIN'\'
146 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
147 LINKFLAGSRUNPATH_OOO=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
148 LINKFLAGSRUNPATH_SDK=-Wl,-rpath,\''$$ORIGIN/../../ure-link/lib'\'
149 LINKFLAGSRUNPATH_BRAND=-Wl,-rpath,\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
150 LINKFLAGSRUNPATH_OXT=
151 LINKFLAGSRUNPATH_NONE=
152 LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS)
153 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
154 LINKFLAGS += -Wl,--as-needed
155 .ENDIF
157 # linker flags for linking applications
158 LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
159 LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
161 # linker flags for linking shared libraries
162 LINKFLAGSSHLGUI= -shared
163 LINKFLAGSSHLCUI= -shared
165 LINKFLAGSTACK=
166 LINKFLAGSPROF=
167 LINKFLAGSDEBUG=-g
168 LINKFLAGSOPT=
170 # linker flags for optimization (symbol hashtable)
171 # for now, applied to symbol scoped libraries, only
172 LINKFLAGSOPTIMIZE*=-Wl,-O1
173 LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
175 SONAME_SWITCH=-Wl,-h
177 # Sequence of libs does matter !
179 STDLIBCPP=-lstdc++
181 # default objectfilenames to link
182 STDOBJVCL=$(L)/salmain.o
183 STDOBJGUI=
184 STDSLOGUI=
185 STDOBJCUI=
186 STDSLOCUI=
188 # libraries for linking applications
189 STDLIBGUIMT=-lX11 $(PTHREAD_LIBS) -lm
190 STDLIBCUIMT=$(PTHREAD_LIBS) -lm
191 # libraries for linking shared libraries
192 STDSHLGUIMT=-lX11 -lXext $(PTHREAD_LIBS) -lm
193 STDSHLCUIMT=$(PTHREAD_LIBS) -lm
195 LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
197 .IF "$(USE_STLP_DEBUG)" != ""
198 .IF "$(STLPORT_VER)" >= "500"
199 LIBSTLPORT=$(DYNAMIC) -lstlportstlg
200 LIBSTLPORTST=$(STATIC) -lstlportstlg $(DYNAMIC)
201 .ELSE
202 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
203 LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
204 .ENDIF
205 .ELSE # "$(USE_STLP_DEBUG)" != ""
206 .IF "$(STLPORT_VER)" >= "500"
207 LIBSTLPORT=$(DYNAMIC) -lstlport
208 LIBSTLPORTST=$(STATIC) -lstlport $(DYNAMIC)
209 .ELSE
210 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
211 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
212 .ENDIF
213 .ENDIF # "$(USE_STLP_DEBUG)" != ""
215 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
217 # name of library manager
218 LIBMGR=ar
219 LIBFLAGS=-r
221 # tool for generating import libraries
222 IMPLIB=
223 IMPLIBFLAGS=
225 MAPSYM=
226 MAPSYMFLAGS=
228 RC=irc
229 RCFLAGS=-fo$@ $(RCFILES)
230 RCLINK=
231 RCLINKFLAGS=
232 RCSETVERSION=
234 # platform specific identifier for shared libs
235 DLLPRE=lib
236 DLLPOST=.so