update dev300-m58
[ooovba.git] / solenv / inc / unxsoli4.mk
blobd15177e7db7bc53a7c8b67be2990905b504cda2c
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: unxsoli4.mk,v $
11 # $Revision: 1.48 $
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 AFLAGS=-P
37 CDEFS+=-D_PTHREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DSTLPORT_VERSION=$(STLPORT_VER)
39 SOLAR_JAVA*=TRUE
40 .IF "$(SOLAR_JAVA)"!=""
41 JAVADEF=-DSOLAR_JAVA
42 JAVAFLAGSDEBUG=-g
43 .IF "$(debug)"==""
44 JAVA_RUNTIME=-ljava
45 .ELSE
46 JAVA_RUNTIME=-ljava_g
47 .ENDIF
48 .ENDIF
50 # architecture dependent flags for the C and C++ compiler that can be changed by
51 # exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
52 ARCH_FLAGS*=
54 CXX*=CC
55 CC*=cc
57 CFLAGS=$(PREENVCFLAGS) -c -temp=/tmp
58 CFLAGSCC=-xCC $(ARCH_FLAGS)
59 CFLAGSCXX=-features=no%altspell -library=no%Cstd $(ARCH_FLAGS)
61 # flags to enable build with symbols; required for crashdump feature
62 CFLAGSENABLESYMBOLS=-g0 -xs # was temporarily commented out, reenabled before Beta
63 CFLAGSENABLESYMBOLS_CC_ONLY=-g -xs # was temporarily commented out, reenabled before Beta
65 CFLAGSEXCEPTIONS=
66 CFLAGS_NO_EXCEPTIONS=-noex
68 CFLAGSOBJGUIMT=-KPIC -mt
69 CFLAGSOBJCUIMT=-KPIC -mt
70 CFLAGSSLOGUIMT=-KPIC -mt
71 CFLAGSSLOCUIMT=-KPIC -mt
72 CFLAGSPROF=-xpg
73 CFLAGSDEBUG=-g
74 CFLAGSDBGUTIL=
75 CFLAGSOPT=-xarch=generic -xO3
76 CFLAGSNOOPT=
77 CFLAGSOUTOBJ=-o
79 # Warnings switched off for CXX:
80 # - doubunder: we have many identifiers containing double underscores, some of
81 # them in the stable UDK API we cannot change
82 # - identexpected: Identifier expected instead of "}"
83 # if an enum ends with a comma before the '}'
84 # this warning does not seem to heed #pragma disable_warn, and is not helpful
85 # - inllargeuse: "function is too large and will not be expanded inline" is
86 # merely a hint
87 # - inllargeint: "function is too large to generate inline, consider writing
88 # it yourself" is merely a hint
89 # - notemsource: "could not find source for function" appears to be spurious
90 # - reftotemp: warns about calling non-const functions on temporary objects,
91 # something legally done by boost::scoped_array<T>::reset, for example
92 # (this_type(p).swap(*this))
93 # - truncwarn: "conversion of 64 bit type value to smaller type causes
94 # truncation" at least with CC 5.8 is reported only at the end of a
95 # compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see
96 # sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be
97 # disabled globally
98 # - wnoretvalue: warning about the last statement of a function not
99 # returning a value. Unfortunately triggers on perfectly acceptable
100 # code, for example if the last statement in is a throw statement
101 # - anonnotype: Warns if a type is declared in an anonymous union. Temporary
102 # disabled until issue i97325 is fixed. Note: The compiler is actually
103 # right about this warning, the C++ standard is explicit about this.
104 CFLAGSWARNCC=
105 CFLAGSWARNCXX=+w2 -erroff=doubunder,identexpected,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn,wnoretvalue,anonnotype
106 CFLAGSWALLCC=$(CFLAGSWARNCC)
107 CFLAGSWALLCXX=$(CFLAGSWARNCXX)
108 CFLAGSWERRCC=-errwarn=%all
109 CFLAGSWERRCXX=-xwe
111 # Once all modules on this platform compile without warnings, set
112 # COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
113 # settings.mk):
114 MODULES_WITH_WARNINGS := \
115 soldep
117 STDOBJVCL=$(L)/salmain.o
119 THREADLIB=
120 .IF "$(PURIFY)"!=""
121 LINK=/usr/local/purify-4.2-solaris2/purify CC
122 .ELSE
123 LINK=$(CXX)
124 .ENDIF
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_SDK=-R\''$$ORIGIN/../../ure-link/lib'\'
143 LINKFLAGSRUNPATH_BRAND=-R\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
144 LINKFLAGSRUNPATH_OXT=
145 LINKFLAGSRUNPATH_NONE=
146 LINKFLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -library=no%Cstd
147 .IF "$(HAVE_WORKING_LD_AS_NEEDED)" == "TRUE"
148 LINKFLAGS += -Wl,--as-needed
149 .ENDIF
150 LINKCFLAGS=-w -mt -z combreloc -norunpath
152 # -z text force fatal error if non PIC code is linked into shared library. Such code
153 # would be expensive on startup
154 CHECKFORPIC =-z text
155 LINKFLAGSSHLGUI=$(CHECKFORPIC) -G
156 LINKFLAGSSHLCUI=$(CHECKFORPIC) -G
158 # switches for dynamic and static linking
159 LINKFLAGSDEFS*= -z defs
160 STATIC = -Bstatic
161 DIRECT = -Bdirect $(LINKFLAGSDEFS)
162 DYNAMIC = -Bdynamic
164 LINKFLAGSAPPGUI+=$(DIRECT)
165 LINKFLAGSAPPCUI+=$(DIRECT)
166 LINKFLAGSSHLGUI+=$(DIRECT)
167 LINKFLAGSSHLCUI+=$(DIRECT)
169 LINKFLAGSTACK=
170 LINKFLAGSPROF=-L$(COMPATH)/WS6U1/lib/libp -xpg -z allextract
171 LINKFLAGSDEBUG=
172 LINKFLAGSOPT=
173 LINKVERSIONMAPFLAG=-M
175 # mapfile for non-executable stack
176 LINKFLAGSNOEXSTK*=$(LINKVERSIONMAPFLAG) $(SOLARENV)/src/solaris_noexstk.map
177 LINKFLAGSAPPGUI+=$(LINKFLAGSNOEXSTK)
178 LINKFLAGSAPPCUI+=$(LINKFLAGSNOEXSTK)
180 APPLINKSTATIC=$(STATIC)
181 APPLINKSHARED=$(DIRECT)
182 APP_LINKTYPE=
184 STDLIBCPP=-lCrun
186 # reihenfolge der libs NICHT egal!
187 STDOBJGUI=
188 .IF "DBG_UTIL" != ""
189 STDSLOGUI=#-lpthread
190 .ELSE
191 STDSLOGUI=
192 .ENDIF
193 STDOBJCUI=
194 STDSLOCUI=
196 # CPPRUNTIME - define where to place C++ runtime if required
197 STDLIBGUIMT=$(DYNAMIC) -lpthread -lm
198 STDLIBCUIMT=$(DYNAMIC) -lpthread -lm
199 STDSHLGUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
200 STDSHLCUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
202 # libdl.so - no really an GUI library but required in this context
203 STDLIBGUIMT+=-lX11 -ldl
204 STDSHLGUIMT+=-lX11 -ldl
206 # @@@ interposer needed for -Bdirect @@@
207 # LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract
208 LIBSALCPPRT=
210 .IF "$(USE_STLP_DEBUG)" != ""
211 LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro_debug
212 LIBSTLPORTST=$(STATIC) -lstlport_sunpro_debug $(DYNAMIC)
213 .ELSE
214 LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro
215 LIBSTLPORTST=$(STATIC) -lstlport_sunpro $(DYNAMIC)
216 .ENDIF # "$(USE_STLP_DEBUG)" != ""
218 LIBMGR=CC
219 LIBFLAGS=-xar -o
221 IMPLIB=
222 IMPLIBFLAGS=
224 MAPSYM=
225 MAPSYMFLAGS=
226 IGNORE_SYMBOLS=S-LP64
228 RC=irc
229 RCFLAGS=-fo$@ $(RCFILES)
230 RCLINK=
231 RCLINKFLAGS=
232 RCSETVERSION=
234 DLLPOSTFIX=si
236 DLLPRE=lib
237 DLLPOST=.so
239 LDUMP=cppfilt /b /n /o /p
241 CFLAGSCXXSLO +=
242 CFLAGSCXXOBJ +=
244 LINKFLAGSAPPGUI+=
245 LINKFLAGSSHLGUI+=
246 LINKFLAGSAPPCUI+=
247 LINKFLAGSSHLCUI+=