merge the formfield patch from ooo-build
[ooovba.git] / solenv / inc / unxsolu4.mk
bloba43d9d8eafdb47e12091e340a2e4acedf6cd2cd2
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: unxsolu4.mk,v $
11 # $Revision: 1.3 $
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 # 64 bit (LP64) platform
34 IS_LP64=TRUE
36 ASM=/usr/ccs/bin/as
37 AFLAGS=-P -xarch=v9
40 CDEFS+=-D_PTHREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DIS_LP64
42 SOLAR_JAVA*=TRUE
43 .IF "$(SOLAR_JAVA)"!=""
44 JAVADEF=-DSOLAR_JAVA
45 JAVAFLAGSDEBUG=-g
46 .IF "$(debug)"==""
47 JAVA_RUNTIME=-ljava
48 .ELSE
49 JAVA_RUNTIME=-ljava_g
50 .ENDIF
51 .ENDIF
53 # architecture dependent flags for the C and C++ compiler that can be changed by
54 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
55 ARCH_FLAGS*=-m64
57 CXX*=CC
58 CC*=cc
60 CFLAGS=$(PREENVCFLAGS) -c -temp=/tmp
61 CFLAGSCC=-xCC $(ARCH_FLAGS)
62 CFLAGSCXX= -features=no%altspell -library=stlport4 $(ARCH_FLAGS)
64 # flags to enable build with symbols; required for crashdump feature
65 CFLAGSENABLESYMBOLS=-g0 -xs # was temporarily commented out, reenabled before Beta
66 CFLAGSENABLESYMBOLS_CC_ONLY=-g -xs # was temporarily commented out, reenabled before Beta
68 CFLAGSEXCEPTIONS=
69 CFLAGS_NO_EXCEPTIONS=-noex
71 CFLAGSOBJGUIMT=-KPIC -mt
72 CFLAGSOBJCUIMT=-KPIC -mt
73 CFLAGSSLOGUIMT=-KPIC -mt
74 CFLAGSSLOCUIMT=-KPIC -mt
75 CFLAGSPROF=-xpg
76 CFLAGSDEBUG=-g
77 CFLAGSDBGUTIL=
78 # -xO3 optimization level 3
79 CFLAGSOPT= -xO3 -xalias_level=compatible
80 CFLAGSNOOPT=
81 CFLAGSOUTOBJ=-o
83 # Warnings switched off for CXX:
84 # - doubunder: we have many identifiers containing double underscores, some of
85 # them in the stable UDK API we cannot change
86 # - identexpected: Identifier expected instead of "}"
87 # if an enum ends with a comma before the '}'
88 # this warning does not seem to heed #pragma disable_warn, and is not helpful
89 # - inllargeuse: "function is too large and will not be expanded inline" is
90 # merely a hint
91 # - inllargeint: "function is too large to generate inline, consider writing
92 # it yourself" is merely a hint
93 # - notemsource: "could not find source for function" appears to be spurious
94 # - reftotemp: warns about calling non-const functions on temporary objects,
95 # something legally done by boost::scoped_array<T>::reset, for example
96 # (this_type(p).swap(*this))
97 # - truncwarn: "conversion of 64 bit type value to smaller type causes
98 # truncation" at least with CC 5.8 is reported only at the end of a
99 # compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see
100 # sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be
101 # disabled globally
102 # - wnoretvalue: "The last statement should return a value."
103 # CC 5.9: the compiler does often not notice that there is no way
104 # to reach the closing brace of a function without either returning a proper
105 # value or throwing an exception.
106 # - hidef: "d::foo() hides the function b::foo()." We got still some cases of mixed
107 # sal_uInt32 and ULONG usages which needs to be fixed. We can then remove this one
108 CFLAGSWARNCC=
109 CFLAGSWARNCXX=+w2 -erroff=doubunder,identexpected,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn,wnoretvalue,hidef,anonnotype,unassigned,badargtype2w
110 CFLAGSWALLCC=$(CFLAGSWARNCC)
111 CFLAGSWALLCXX=$(CFLAGSWARNCXX)
112 CFLAGSWERRCC=-errwarn=%all
113 CFLAGSWERRCXX=-xwe
115 # Once all modules on this platform compile without warnings, set
116 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
117 # settings.mk):
118 MODULES_WITH_WARNINGS := \
119 soldep
121 STDOBJVCL=$(L)/salmain.o
123 THREADLIB=
124 LINK=$(CXX)
125 LINKC=$(CC)
127 # link against set of baseline libraries
128 .IF "$(SYSBASE)"!=""
129 C_RESTRICTIONFLAGS*=-xc99=none
130 LD_OPTIONS+=-L$(SYSBASE)/usr/lib
131 CDEFS+=-DSYSBASE="$(SYSBASE)"
132 CFLAGSCC+=$(C_RESTRICTIONFLAGS)
133 .EXPORT : LD_OPTIONS
134 .ENDIF # "$(SYSBASE)"!=""
136 # -z combreloc combines multiple relocation sections. Reduces overhead on startup
137 # -norunpath prevents the compiler from recording his own libs in the runpath
138 LINKFLAGSRUNPATH_URELIB=-R\''$$ORIGIN'\'
139 LINKFLAGSRUNPATH_UREBIN=-R\''$$ORIGIN/../lib:$$ORIGIN'\'
140 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
141 LINKFLAGSRUNPATH_OOO=-R\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
142 LINKFLAGSRUNPATH_BRAND=-R\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
143 LINKFLAGSRUNPATH_OXT=
144 LINKFLAGS=-m64 -w -mt -z combreloc -PIC -temp=/tmp -norunpath -library=stlport4
145 LINKCFLAGS=-m64 -w -mt -z combreloc -norunpath
146 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
147 LINKFLAGS += -Wl,--as-needed
148 .ENDIF
150 # -z text force fatal error if non PIC code is linked into shared library. Such code
151 # would be expensive on startup
152 CHECKFORPIC =-z text
153 LINKFLAGSSHLGUI=$(CHECKFORPIC) -G
154 LINKFLAGSSHLCUI=$(CHECKFORPIC) -G
156 # switches for dynamic and static linking
157 LINKFLAGSDEFS*= -z defs
158 STATIC = -Bstatic
159 DIRECT = -Bdirect $(LINKFLAGSDEFS)
160 DYNAMIC = -Bdynamic
162 LINKFLAGSAPPGUI+=$(DIRECT)
163 LINKFLAGSAPPCUI+=$(DIRECT)
164 LINKFLAGSSHLGUI+=$(DIRECT)
165 LINKFLAGSSHLCUI+=$(DIRECT)
167 LINKFLAGSTACK=
168 LINKFLAGSPROF=
169 LINKFLAGSDEBUG=
170 LINKFLAGSOPT=
171 LINKVERSIONMAPFLAG=-M
173 # mapfile for non-executable stack
174 LINKFLAGSNOEXSTK*=$(LINKVERSIONMAPFLAG) $(SOLARENV)/src/solaris_noexstk.map
175 LINKFLAGSAPPGUI+=$(LINKFLAGSNOEXSTK)
176 LINKFLAGSAPPCUI+=$(LINKFLAGSNOEXSTK)
178 APPLINKSTATIC=$(STATIC)
179 APPLINKSHARED=$(DIRECT)
180 APP_LINKTYPE=
182 STDLIBCPP=-lCrun
184 # reihenfolge der libs NICHT egal!
185 STDOBJGUI=
186 .IF "DBG_UTIL" != ""
187 STDSLOGUI=#-lpthread
188 .ELSE
189 STDSLOGUI=
190 .ENDIF
191 STDOBJCUI=
192 STDSLOCUI=
194 # CPPRUNTIME - define where to place C++ runtime if required
195 STDLIBGUIMT=$(DYNAMIC) -lpthread -lm
196 STDLIBCUIMT=$(DYNAMIC) -lpthread -lm
197 STDSHLGUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
198 STDSHLCUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
200 # libdl.so - no really an GUI library but required in this context
201 STDLIBGUIMT+=-lX11 -ldl
202 STDSHLGUIMT+=-lX11 -ldl
204 # @@@ interposer needed for -Bdirect @@@
205 # LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract
206 LIBSALCPPRT=
208 .IF "$(USE_STLP_DEBUG)" != ""
209 LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro_debug
210 LIBSTLPORTST=$(STATIC) -lstlport_sunpro_debug $(DYNAMIC)
211 .ELSE
212 LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro
213 LIBSTLPORTST=$(STATIC) -lstlport_sunpro $(DYNAMIC)
214 .ENDIF # "$(USE_STLP_DEBUG)" != ""
216 LIBMGR=CC
217 LIBFLAGS=-xar -o
219 IMPLIB=
220 IMPLIBFLAGS=
222 MAPSYM=
223 MAPSYMFLAGS=
224 IGNORE_SYMBOLS=S-ILP32
226 RC=irc
227 RCFLAGS=-fo$@ $(RCFILES)
228 RCLINK=
229 RCLINKFLAGS=
230 RCSETVERSION=
232 DLLPOSTFIX=su
234 DLLPRE=lib
235 DLLPOST=.so
237 LDUMP=cppfilt /b /n /o /p
239 CFLAGSCXXSLO +=
240 CFLAGSCXXOBJ +=
242 LINKFLAGSAPPGUI+=
243 LINKFLAGSSHLGUI+=
244 LINKFLAGSAPPCUI+=
245 LINKFLAGSSHLCUI+=
247 BUILD64=1