xref: /aoo42x/main/solenv/inc/unxsoli4.mk (revision cdf0e10c)
1*cdf0e10cSrcweir#*************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir#*************************************************************************
27*cdf0e10cSrcweir
28*cdf0e10cSrcweir
29*cdf0e10cSrcweirASM=/usr/ccs/bin/as
30*cdf0e10cSrcweirAFLAGS=-P
31*cdf0e10cSrcweir
32*cdf0e10cSrcweirCDEFS+=-D_PTHREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DSTLPORT_VERSION=$(STLPORT_VER)
33*cdf0e10cSrcweir
34*cdf0e10cSrcweirSOLAR_JAVA*=TRUE
35*cdf0e10cSrcweir.IF "$(SOLAR_JAVA)"!=""
36*cdf0e10cSrcweirJAVADEF=-DSOLAR_JAVA
37*cdf0e10cSrcweirJAVAFLAGSDEBUG=-g
38*cdf0e10cSrcweir.IF "$(debug)"==""
39*cdf0e10cSrcweirJAVA_RUNTIME=-ljava
40*cdf0e10cSrcweir.ELSE
41*cdf0e10cSrcweirJAVA_RUNTIME=-ljava_g
42*cdf0e10cSrcweir.ENDIF
43*cdf0e10cSrcweir.ENDIF
44*cdf0e10cSrcweir
45*cdf0e10cSrcweir# architecture dependent flags for the C and C++ compiler that can be changed by
46*cdf0e10cSrcweir# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
47*cdf0e10cSrcweirARCH_FLAGS*=
48*cdf0e10cSrcweir
49*cdf0e10cSrcweirCXX*=CC
50*cdf0e10cSrcweirCC*=cc
51*cdf0e10cSrcweir
52*cdf0e10cSrcweirCFLAGS=$(PREENVCFLAGS) -c -temp=/tmp
53*cdf0e10cSrcweirCFLAGSCC=-xCC $(ARCH_FLAGS)
54*cdf0e10cSrcweirCFLAGSCXX=-features=no%altspell -library=no%Cstd $(ARCH_FLAGS)
55*cdf0e10cSrcweir
56*cdf0e10cSrcweir# flags to enable build with symbols; required for crashdump feature
57*cdf0e10cSrcweirCFLAGSENABLESYMBOLS=-g0 -xs # was temporarily commented out, reenabled before Beta
58*cdf0e10cSrcweirCFLAGSENABLESYMBOLS_CC_ONLY=-g -xs # was temporarily commented out, reenabled before Beta
59*cdf0e10cSrcweir
60*cdf0e10cSrcweirCFLAGSEXCEPTIONS=
61*cdf0e10cSrcweirCFLAGS_NO_EXCEPTIONS=-noex
62*cdf0e10cSrcweir
63*cdf0e10cSrcweirCFLAGSOBJGUIMT=-KPIC -mt
64*cdf0e10cSrcweirCFLAGSOBJCUIMT=-KPIC -mt
65*cdf0e10cSrcweirCFLAGSSLOGUIMT=-KPIC -mt
66*cdf0e10cSrcweirCFLAGSSLOCUIMT=-KPIC -mt
67*cdf0e10cSrcweirCFLAGSPROF=-xpg
68*cdf0e10cSrcweirCFLAGSDEBUG=-g
69*cdf0e10cSrcweirCFLAGSDBGUTIL=
70*cdf0e10cSrcweirCFLAGSOPT=-xarch=generic -xO3
71*cdf0e10cSrcweirCFLAGSNOOPT=
72*cdf0e10cSrcweirCFLAGSOUTOBJ=-o
73*cdf0e10cSrcweir
74*cdf0e10cSrcweir# Warnings switched off for CXX:
75*cdf0e10cSrcweir# - doubunder: we have many identifiers containing double underscores, some of
76*cdf0e10cSrcweir#   them in the stable UDK API we cannot change
77*cdf0e10cSrcweir# - identexpected: Identifier expected instead of "}"
78*cdf0e10cSrcweir#   if an enum ends with a comma before the '}'
79*cdf0e10cSrcweir#   this warning does not seem to heed #pragma disable_warn, and is not helpful
80*cdf0e10cSrcweir# - inllargeuse: "function is too large and will not be expanded inline" is
81*cdf0e10cSrcweir#   merely a hint
82*cdf0e10cSrcweir# - inllargeint: "function is too large to generate inline, consider writing
83*cdf0e10cSrcweir#   it yourself" is merely a hint
84*cdf0e10cSrcweir# - notemsource: "could not find source for function" appears to be spurious
85*cdf0e10cSrcweir# - reftotemp: warns about calling non-const functions on temporary objects,
86*cdf0e10cSrcweir#   something legally done by boost::scoped_array<T>::reset, for example
87*cdf0e10cSrcweir#   (this_type(p).swap(*this))
88*cdf0e10cSrcweir# - truncwarn: "conversion of 64 bit type value to smaller type causes
89*cdf0e10cSrcweir#   truncation" at least with CC 5.8 is reported only at the end of a
90*cdf0e10cSrcweir#   compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see
91*cdf0e10cSrcweir#   sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be
92*cdf0e10cSrcweir#   disabled globally
93*cdf0e10cSrcweir# - wnoretvalue: warning about the last statement of a function not
94*cdf0e10cSrcweir#   returning a value. Unfortunately triggers on perfectly acceptable
95*cdf0e10cSrcweir#   code, for example if the last statement in is a throw statement
96*cdf0e10cSrcweir# - anonnotype: Warns if a type is declared in an anonymous union. Temporary
97*cdf0e10cSrcweir#   disabled until issue i97325 is fixed. Note: The compiler is actually
98*cdf0e10cSrcweir#   right about this warning, the C++ standard is explicit about this.
99*cdf0e10cSrcweirCFLAGSWARNCC=
100*cdf0e10cSrcweirCFLAGSWARNCXX=+w2 -erroff=doubunder,identexpected,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn,wnoretvalue,anonnotype
101*cdf0e10cSrcweirCFLAGSWALLCC=$(CFLAGSWARNCC)
102*cdf0e10cSrcweirCFLAGSWALLCXX=$(CFLAGSWARNCXX)
103*cdf0e10cSrcweirCFLAGSWERRCC=-errwarn=%all
104*cdf0e10cSrcweirCFLAGSWERRCXX=-xwe
105*cdf0e10cSrcweir
106*cdf0e10cSrcweir# Once all modules on this platform compile without warnings, set
107*cdf0e10cSrcweir# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
108*cdf0e10cSrcweir# settings.mk):
109*cdf0e10cSrcweirMODULES_WITH_WARNINGS := \
110*cdf0e10cSrcweir    soldep
111*cdf0e10cSrcweir
112*cdf0e10cSrcweirSTDOBJVCL=$(L)/salmain.o
113*cdf0e10cSrcweir
114*cdf0e10cSrcweirTHREADLIB=
115*cdf0e10cSrcweir.IF "$(PURIFY)"!=""
116*cdf0e10cSrcweirLINK=/usr/local/purify-4.2-solaris2/purify CC
117*cdf0e10cSrcweir.ELSE
118*cdf0e10cSrcweirLINK=$(CXX)
119*cdf0e10cSrcweir.ENDIF
120*cdf0e10cSrcweirLINKC=$(CC)
121*cdf0e10cSrcweir
122*cdf0e10cSrcweir# link against set of baseline libraries
123*cdf0e10cSrcweir.IF "$(SYSBASE)"!=""
124*cdf0e10cSrcweirC_RESTRICTIONFLAGS*=-xc99=none
125*cdf0e10cSrcweir#LD_OPTIONS+:=-L$(SYSBASE)/usr/lib
126*cdf0e10cSrcweirCDEFS+=-DSYSBASE="$(SYSBASE)"
127*cdf0e10cSrcweirCFLAGSCC+=$(C_RESTRICTIONFLAGS)
128*cdf0e10cSrcweir#.EXPORT : LD_OPTIONS
129*cdf0e10cSrcweir.ENDIF          # "$(SYSBASE)"!=""
130*cdf0e10cSrcweir
131*cdf0e10cSrcweir# -z combreloc combines multiple relocation sections. Reduces overhead on startup
132*cdf0e10cSrcweir# -norunpath prevents the compiler from recording his own libs in the runpath
133*cdf0e10cSrcweirLINKFLAGSRUNPATH_URELIB=-R\''$$ORIGIN'\'
134*cdf0e10cSrcweirLINKFLAGSRUNPATH_UREBIN=-R\''$$ORIGIN/../lib:$$ORIGIN'\'
135*cdf0e10cSrcweir    #TODO: drop $ORIGIN once no URE executable is also shipped in OOo
136*cdf0e10cSrcweirLINKFLAGSRUNPATH_OOO=-R\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
137*cdf0e10cSrcweirLINKFLAGSRUNPATH_SDK=-R\''$$ORIGIN/../../ure-link/lib'\'
138*cdf0e10cSrcweirLINKFLAGSRUNPATH_BRAND=-R\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
139*cdf0e10cSrcweirLINKFLAGSRUNPATH_OXT=
140*cdf0e10cSrcweirLINKFLAGSRUNPATH_BOXT=-R\''$$ORIGIN/../../../basis-link/program'\'
141*cdf0e10cSrcweirLINKFLAGSRUNPATH_NONE=
142*cdf0e10cSrcweirLINKFLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -library=no%Cstd
143*cdf0e10cSrcweirLINKCFLAGS=-w -mt -z combreloc -norunpath
144*cdf0e10cSrcweir
145*cdf0e10cSrcweir# -z text force fatal error if non PIC code is linked into shared library. Such code
146*cdf0e10cSrcweir#    would be expensive on startup
147*cdf0e10cSrcweirCHECKFORPIC =-z text
148*cdf0e10cSrcweirLINKFLAGSSHLGUI=$(CHECKFORPIC) -G
149*cdf0e10cSrcweirLINKFLAGSSHLCUI=$(CHECKFORPIC) -G
150*cdf0e10cSrcweir
151*cdf0e10cSrcweir# switches for dynamic and static linking
152*cdf0e10cSrcweirLINKFLAGSDEFS*= -z defs
153*cdf0e10cSrcweirSTATIC		= -Bstatic
154*cdf0e10cSrcweirDIRECT		= -Bdirect $(LINKFLAGSDEFS)
155*cdf0e10cSrcweirDYNAMIC		= -Bdynamic
156*cdf0e10cSrcweir
157*cdf0e10cSrcweirLINKFLAGSAPPGUI+=$(DIRECT)
158*cdf0e10cSrcweirLINKFLAGSAPPCUI+=$(DIRECT)
159*cdf0e10cSrcweirLINKFLAGSSHLGUI+=$(DIRECT)
160*cdf0e10cSrcweirLINKFLAGSSHLCUI+=$(DIRECT)
161*cdf0e10cSrcweir
162*cdf0e10cSrcweirLINKFLAGSTACK=
163*cdf0e10cSrcweirLINKFLAGSPROF=-L$(COMPATH)/WS6U1/lib/libp -xpg -z allextract
164*cdf0e10cSrcweirLINKFLAGSDEBUG=
165*cdf0e10cSrcweirLINKFLAGSOPT=
166*cdf0e10cSrcweirLINKVERSIONMAPFLAG=-M
167*cdf0e10cSrcweir
168*cdf0e10cSrcweir# mapfile for non-executable stack
169*cdf0e10cSrcweirLINKFLAGSNOEXSTK*=$(LINKVERSIONMAPFLAG) $(SOLARENV)/src/solaris_noexstk.map
170*cdf0e10cSrcweirLINKFLAGSAPPGUI+=$(LINKFLAGSNOEXSTK)
171*cdf0e10cSrcweirLINKFLAGSAPPCUI+=$(LINKFLAGSNOEXSTK)
172*cdf0e10cSrcweir
173*cdf0e10cSrcweirAPPLINKSTATIC=$(STATIC)
174*cdf0e10cSrcweirAPPLINKSHARED=$(DIRECT)
175*cdf0e10cSrcweirAPP_LINKTYPE=
176*cdf0e10cSrcweir
177*cdf0e10cSrcweirSTDLIBCPP=-lCrun
178*cdf0e10cSrcweir
179*cdf0e10cSrcweir# reihenfolge der libs NICHT egal!
180*cdf0e10cSrcweirSTDOBJGUI=
181*cdf0e10cSrcweir.IF "DBG_UTIL" != ""
182*cdf0e10cSrcweirSTDSLOGUI=#-lpthread
183*cdf0e10cSrcweir.ELSE
184*cdf0e10cSrcweirSTDSLOGUI=
185*cdf0e10cSrcweir.ENDIF
186*cdf0e10cSrcweirSTDOBJCUI=
187*cdf0e10cSrcweirSTDSLOCUI=
188*cdf0e10cSrcweir
189*cdf0e10cSrcweir# CPPRUNTIME - define where to place C++ runtime if required
190*cdf0e10cSrcweirSTDLIBGUIMT=$(DYNAMIC) -lpthread -lm
191*cdf0e10cSrcweirSTDLIBCUIMT=$(DYNAMIC) -lpthread -lm
192*cdf0e10cSrcweirSTDSHLGUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
193*cdf0e10cSrcweirSTDSHLCUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
194*cdf0e10cSrcweir
195*cdf0e10cSrcweir# libdl.so - no really an GUI library but required in this context
196*cdf0e10cSrcweirSTDLIBGUIMT+=-ldl
197*cdf0e10cSrcweirSTDSHLGUIMT+=-ldl
198*cdf0e10cSrcweirX11LINK_DYNAMIC = -lXext -lX11
199*cdf0e10cSrcweir
200*cdf0e10cSrcweir# @@@ interposer needed for -Bdirect @@@
201*cdf0e10cSrcweir# LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract
202*cdf0e10cSrcweirLIBSALCPPRT=
203*cdf0e10cSrcweir
204*cdf0e10cSrcweir.IF "$(USE_STLP_DEBUG)" != ""
205*cdf0e10cSrcweirLIBSTLPORT=$(DYNAMIC) -lstlport_sunpro_debug
206*cdf0e10cSrcweirLIBSTLPORTST=$(STATIC) -lstlport_sunpro_debug $(DYNAMIC)
207*cdf0e10cSrcweir.ELSE
208*cdf0e10cSrcweirLIBSTLPORT=$(DYNAMIC) -lstlport_sunpro
209*cdf0e10cSrcweirLIBSTLPORTST=$(STATIC) -lstlport_sunpro $(DYNAMIC)
210*cdf0e10cSrcweir.ENDIF # "$(USE_STLP_DEBUG)" != ""
211*cdf0e10cSrcweir
212*cdf0e10cSrcweirLIBMGR=CC
213*cdf0e10cSrcweirLIBFLAGS=-xar -o
214*cdf0e10cSrcweir
215*cdf0e10cSrcweirIMPLIB=
216*cdf0e10cSrcweirIMPLIBFLAGS=
217*cdf0e10cSrcweir
218*cdf0e10cSrcweirMAPSYM=
219*cdf0e10cSrcweirMAPSYMFLAGS=
220*cdf0e10cSrcweirIGNORE_SYMBOLS=S-LP64
221*cdf0e10cSrcweir
222*cdf0e10cSrcweirRC=irc
223*cdf0e10cSrcweirRCFLAGS=-fo$@ $(RCFILES)
224*cdf0e10cSrcweirRCLINK=
225*cdf0e10cSrcweirRCLINKFLAGS=
226*cdf0e10cSrcweirRCSETVERSION=
227*cdf0e10cSrcweir
228*cdf0e10cSrcweirDLLPOSTFIX=si
229*cdf0e10cSrcweir
230*cdf0e10cSrcweirDLLPRE=lib
231*cdf0e10cSrcweirDLLPOST=.so
232*cdf0e10cSrcweir
233*cdf0e10cSrcweirLDUMP=cppfilt /b /n /o /p
234*cdf0e10cSrcweir
235*cdf0e10cSrcweirCFLAGSCXXSLO +=
236*cdf0e10cSrcweirCFLAGSCXXOBJ +=
237*cdf0e10cSrcweir
238*cdf0e10cSrcweirLINKFLAGSAPPGUI+=
239*cdf0e10cSrcweirLINKFLAGSSHLGUI+=
240*cdf0e10cSrcweirLINKFLAGSAPPCUI+=
241*cdf0e10cSrcweirLINKFLAGSSHLCUI+=
242