update dev300-m58
[ooovba.git] / solenv / inc / unxbsdi2.mk
blobb1a91f6387ad52d9ea928509df1555324ccc7f52
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: unxbsdi2.mk,v $
11 # $Revision: 1.18 $
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
33 ASM=
34 AFLAGS=
36 SOLAR_JAVA=TRUE
37 JAVAFLAGSDEBUG=-g
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)"!=""
48 JAVADEF=-DSOLAR_JAVA
49 .IF "$(debug)"==""
50 JAVA_RUNTIME=-ljava
51 .ELSE
52 JAVA_RUNTIME=-ljava_g
53 .ENDIF
54 .ENDIF
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*=
60 # name of C++ Compiler
61 CXX*=g++
62 # name of C Compiler
63 CC*=gcc
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
70 .ELSE
71 CFLAGSENABLESYMBOLS=-g
72 .ENDIF
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)
82 PICSWITCH:=-fpic
84 # Compiler flags for compiling static object in multi threaded environment with graphical user interface
85 CFLAGSOBJGUIMT=
86 # Compiler flags for compiling static object in multi threaded environment with character user interface
87 CFLAGSOBJCUIMT=
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
93 CFLAGSPROF=
94 # Compiler flags for debugging
95 CFLAGSDEBUG=-g
96 CFLAGSDBGUTIL=
97 # Compiler flags for enabling optimizations
98 # CFLAGSOPT=-O2
99 # reduce to -O1 to avoid optimization problems
100 CFLAGSOPT=-O1
101 # Compiler flags for disabling optimizations
102 CFLAGSNOOPT=-O
103 # Compiler flags for describing the output path
104 CFLAGSOUTOBJ=-o
106 CFLAGSWARNCC=
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
111 CFLAGSWERRCC=-Werror
113 # switches for dynamic and static linking
114 STATIC = -Wl,-Bstatic
115 DYNAMIC = -Wl,-Bdynamic
117 # name of linker
118 LINK*=$(CC)
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
133 .ENDIF
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
143 LINKFLAGSTACK=
144 LINKFLAGSPROF=
145 LINKFLAGSDEBUG=-g
146 LINKFLAGSOPT=
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
153 SONAME_SWITCH=-Wl,-h
155 # Sequence of libs does matter !
157 STDLIBCPP=-lstdc++
159 # default objectfilenames to link
160 STDOBJGUI=
161 STDSLOGUI=
162 STDOBJCUI=
163 STDSLOCUI=
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)
177 .ELSE
178 LIBSTLPORT=$(DYNAMIC) -lstlport_gcc -lstdc++
179 LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
180 .ENDIF
182 #FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
184 # name of library manager
185 LIBMGR=ar
186 LIBFLAGS=-r
188 # tool for generating import libraries
189 IMPLIB=
190 IMPLIBFLAGS=
192 MAPSYM=
193 MAPSYMFLAGS=
195 RC=irc
196 RCFLAGS=-fo$@ $(RCFILES)
197 RCLINK=
198 RCLINKFLAGS=
199 RCSETVERSION=
201 # platform specific identifier for shared libs
202 DLLPOSTFIX=bi
203 DLLPRE=lib
204 DLLPOST=.so