update dev300-m57
[ooovba.git] / solenv / inc / unxsols4.mk
blob4cb9553542de7c0e86ace0ec561de11283019bb6
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: unxsols4.mk,v $
11 # $Revision: 1.53 $
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 #*************************************************************************
33 ASM=/usr/ccs/bin/as
34 # needs -D__sparcv8plus because it's not defined by the assembler with -xarch=v8plus
35 AFLAGS=-P -xarch=v8plus -D__sparcv8plus
38 CDEFS+=-D_PTHREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DSTLPORT_VERSION=$(STLPORT_VER)
40 SOLAR_JAVA*=TRUE
41 .IF "$(SOLAR_JAVA)"!=""
42 JAVADEF=-DSOLAR_JAVA
43 JAVAFLAGSDEBUG=-g
44 .IF "$(debug)"==""
45 JAVA_RUNTIME=-ljava
46 .ELSE
47 JAVA_RUNTIME=-ljava_g
48 .ENDIF
49 .ENDIF
51 # architecture dependent flags for the C and C++ compiler that can be changed by
52 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
53 ARCH_FLAGS*=
55 CXX*=CC
56 CC*=cc
58 CFLAGS=$(PREENVCFLAGS) -c -temp=/tmp
59 # CC defines __sparcv8plus with -xarch=v8plus, cc does not (sigh)
60 CFLAGSCC=-xCC -D__sparcv8plus $(ARCH_FLAGS)
61 CFLAGSCXX=-features=no%altspell -library=no%Cstd $(ARCH_FLAGS)
63 # flags to enable build with symbols; required for crashdump feature
64 CFLAGSENABLESYMBOLS=-g0 -xs # was temporarily commented out, reenabled before Beta
65 CFLAGSENABLESYMBOLS_CC_ONLY=-g -xs # was temporarily commented out, reenabled before Beta
67 CFLAGSEXCEPTIONS=
68 CFLAGS_NO_EXCEPTIONS=-noex
70 CFLAGSOBJGUIMT=-KPIC -mt
71 CFLAGSOBJCUIMT=-KPIC -mt
72 CFLAGSSLOGUIMT=-KPIC -mt
73 CFLAGSSLOCUIMT=-KPIC -mt
74 CFLAGSPROF=-xpg
75 CFLAGSDEBUG=-g
76 CFLAGSDBGUTIL=
77 # -m32 -xarch=sparc restrict target to 32 bit sparc
78 # -xO3 optimization level 3
79 # -xspace don't do optimizations which do increase binary size
80 # -xprefetch=yes do prefetching (helps on UltraSparc III)
81 CFLAGSOPT=-m32 -xarch=sparc -xO3 -xspace -xprefetch=yes
82 CFLAGSNOOPT=
83 CFLAGSOUTOBJ=-o
85 # Warnings switched off for CXX:
86 # - doubunder: we have many identifiers containing double underscores, some of
87 # them in the stable UDK API we cannot change
88 # - identexpected: Identifier expected instead of "}"
89 # if an enum ends with a comma before the '}'
90 # this warning does not seem to heed #pragma disable_warn, and is not helpful
91 # - inllargeuse: "function is too large and will not be expanded inline" is
92 # merely a hint
93 # - inllargeint: "function is too large to generate inline, consider writing
94 # it yourself" is merely a hint
95 # - notemsource: "could not find source for function" appears to be spurious
96 # - reftotemp: warns about calling non-const functions on temporary objects,
97 # something legally done by boost::scoped_array<T>::reset, for example
98 # (this_type(p).swap(*this))
99 # - truncwarn: "conversion of 64 bit type value to smaller type causes
100 # truncation" at least with CC 5.8 is reported only at the end of a
101 # compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see
102 # sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be
103 # disabled globally
104 # - wnoretvalue: warning about the last statement of a function not
105 # returning a value. Unfortunately triggers on perfectly acceptable
106 # code, for example if the last statement in is a throw statement
107 # - anonnotype: Warns if a type is declared in an anonymous union. Temporary
108 # disabled until issue i97325 is fixed. Note: The compiler is actually
109 # right about this warning, the C++ standard is explicit about this.
110 CFLAGSWARNCC=
111 CFLAGSWARNCXX=+w2 -erroff=doubunder,identexpected,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn,wnoretvalue,anonnotype
112 CFLAGSWALLCC=$(CFLAGSWARNCC)
113 CFLAGSWALLCXX=$(CFLAGSWARNCXX)
114 CFLAGSWERRCC=-errwarn=%all
115 CFLAGSWERRCXX=-xwe
117 # Once all modules on this platform compile without warnings, set
118 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
119 # settings.mk):
120 MODULES_WITH_WARNINGS := \
121 soldep
123 STDOBJVCL=$(L)$/salmain.o
125 THREADLIB=
126 .IF "$(PURIFY)"!=""
127 LINK=/usr/local/purify-4.2-solaris2/purify CC
128 .ELSE
129 LINK=$(CXX)
130 .ENDIF
131 LINKC=$(CC)
133 # link against set of baseline libraries
134 .IF "$(SYSBASE)"!=""
135 C_RESTRICTIONFLAGS*=-xc99=none
136 #LD_OPTIONS+:=-L$(SYSBASE)$/usr$/lib
137 CDEFS+=-DSYSBASE="$(SYSBASE)"
138 CFLAGSCC+=$(C_RESTRICTIONFLAGS)
139 #.EXPORT : LD_OPTIONS
140 .ENDIF # "$(SYSBASE)"!=""
142 # -z combreloc combines multiple relocation sections. Reduces overhead on startup
143 # -norunpath prevents the compiler from recording his own libs in the runpath
144 LINKFLAGSRUNPATH_URELIB=-R\''$$ORIGIN'\'
145 LINKFLAGSRUNPATH_UREBIN=-R\''$$ORIGIN/../lib:$$ORIGIN'\'
146 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
147 LINKFLAGSRUNPATH_OOO=-R\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
148 LINKFLAGSRUNPATH_SDK=-R\''$$ORIGIN/../../ure-link/lib'\'
149 LINKFLAGSRUNPATH_BRAND=-R\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
150 LINKFLAGSRUNPATH_OXT=
151 LINKFLAGSRUNPATH_NONE=
152 LINKFLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -library=no%Cstd
153 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
154 LINKFLAGS += -Wl,--as-needed
155 .ENDIF
156 LINKCFLAGS=-w -mt -z combreloc -norunpath
158 # -z text force fatal error if non PIC code is linked into shared library. Such code
159 # would be expensive on startup
160 CHECKFORPIC =-z text
161 LINKFLAGSSHLGUI=$(CHECKFORPIC) -G
162 LINKFLAGSSHLCUI=$(CHECKFORPIC) -G
164 # switches for dynamic and static linking
165 LINKFLAGSDEFS*= -z defs
166 STATIC = -Bstatic
167 DIRECT = -Bdirect $(LINKFLAGSDEFS)
168 DYNAMIC = -Bdynamic
170 LINKFLAGSAPPGUI+=$(DIRECT)
171 LINKFLAGSAPPCUI+=$(DIRECT)
172 LINKFLAGSSHLGUI+=$(DIRECT)
173 LINKFLAGSSHLCUI+=$(DIRECT)
175 LINKFLAGSTACK=
176 LINKFLAGSPROF=-L$(COMPATH)/WS6U1/lib/libp -xpg -z allextract
177 LINKFLAGSDEBUG=
178 LINKFLAGSOPT=
179 LINKVERSIONMAPFLAG=-M
181 # mapfile for non-executable stack
182 LINKFLAGSNOEXSTK*=$(LINKVERSIONMAPFLAG) $(SOLARENV)/src/solaris_noexstk.map
183 LINKFLAGSAPPGUI+=$(LINKFLAGSNOEXSTK)
184 LINKFLAGSAPPCUI+=$(LINKFLAGSNOEXSTK)
186 APPLINKSTATIC=$(STATIC)
187 APPLINKSHARED=$(DIRECT)
188 APP_LINKTYPE=
190 STDLIBCPP=-lCrun
192 # reihenfolge der libs NICHT egal!
193 STDOBJGUI=
194 .IF "DBG_UTIL" != ""
195 STDSLOGUI=#-lpthread
196 .ELSE
197 STDSLOGUI=
198 .ENDIF
199 STDOBJCUI=
200 STDSLOCUI=
202 # CPPRUNTIME - define where to place C++ runtime if required
203 STDLIBGUIMT=$(DYNAMIC) -lpthread -lm
204 STDLIBCUIMT=$(DYNAMIC) -lpthread -lm
205 STDSHLGUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
206 STDSHLCUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
208 # libdl.so - no really an GUI library but required in this context
209 STDLIBGUIMT+=-lX11 -ldl
210 STDSHLGUIMT+=-lX11 -ldl
212 # @@@ interposer needed for -Bdirect @@@
213 # LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract
214 LIBSALCPPRT=
216 .IF "$(USE_STLP_DEBUG)" != ""
217 LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro_debug
218 LIBSTLPORTST=$(STATIC) -lstlport_sunpro_debug $(DYNAMIC)
219 .ELSE
220 LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro
221 LIBSTLPORTST=$(STATIC) -lstlport_sunpro $(DYNAMIC)
222 .ENDIF # "$(USE_STLP_DEBUG)" != ""
224 LIBMGR=CC
225 LIBFLAGS=-xar -o
227 IMPLIB=
228 IMPLIBFLAGS=
230 MAPSYM=
231 MAPSYMFLAGS=
232 IGNORE_SYMBOLS=S-LP64
234 RC=irc
235 RCFLAGS=-fo$@ $(RCFILES)
236 RCLINK=
237 RCLINKFLAGS=
238 RCSETVERSION=
240 DLLPOSTFIX=ss
242 DLLPRE=lib
243 DLLPOST=.so
245 LDUMP=cppfilt /b /n /o /p
247 CFLAGSCXXSLO +=
248 CFLAGSCXXOBJ +=
250 LINKFLAGSAPPGUI+=
251 LINKFLAGSSHLGUI+=
252 LINKFLAGSAPPCUI+=
253 LINKFLAGSSHLCUI+=