1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 11# OpenOffice.org is free software: you can redistribute it and/or modify 12# it under the terms of the GNU Lesser General Public License version 3 13# only, as published by the Free Software Foundation. 14# 15# OpenOffice.org is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY; without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18# GNU Lesser General Public License version 3 for more details 19# (a copy is included in the LICENSE file that accompanied this code). 20# 21# You should have received a copy of the GNU Lesser General Public License 22# version 3 along with OpenOffice.org. If not, see 23# <http://www.openoffice.org/license.html> 24# for a copy of the LGPLv3 License. 25# 26#************************************************************************* 27 28 29# 64 bit (LP64) platform 30IS_LP64=TRUE 31 32ASM=/usr/ccs/bin/as 33AFLAGS=-P -xarch=v9 34 35 36CDEFS+=-D_PTHREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DIS_LP64 37 38SOLAR_JAVA*=TRUE 39.IF "$(SOLAR_JAVA)"!="" 40JAVADEF=-DSOLAR_JAVA 41JAVAFLAGSDEBUG=-g 42.IF "$(debug)"=="" 43JAVA_RUNTIME=-ljava 44.ELSE 45JAVA_RUNTIME=-ljava_g 46.ENDIF 47.ENDIF 48 49# architecture dependent flags for the C and C++ compiler that can be changed by 50# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build 51ARCH_FLAGS*=-m64 52 53CXX*=CC 54CC*=cc 55 56CFLAGS=$(PREENVCFLAGS) -c -temp=/tmp 57CFLAGSCC=-xCC $(ARCH_FLAGS) 58CFLAGSCXX= -features=no%altspell -library=stlport4 $(ARCH_FLAGS) 59 60# flags to enable build with symbols; required for crashdump feature 61CFLAGSENABLESYMBOLS=-g0 -xs # was temporarily commented out, reenabled before Beta 62CFLAGSENABLESYMBOLS_CC_ONLY=-g -xs # was temporarily commented out, reenabled before Beta 63 64CFLAGSEXCEPTIONS= 65CFLAGS_NO_EXCEPTIONS=-noex 66 67CFLAGSOBJGUIMT=-KPIC -mt 68CFLAGSOBJCUIMT=-KPIC -mt 69CFLAGSSLOGUIMT=-KPIC -mt 70CFLAGSSLOCUIMT=-KPIC -mt 71CFLAGSPROF=-xpg 72CFLAGSDEBUG=-g 73CFLAGSDBGUTIL= 74# -xO3 optimization level 3 75CFLAGSOPT= -xO3 -xalias_level=compatible 76CFLAGSNOOPT= 77CFLAGSOUTOBJ=-o 78 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: "The last statement should return a value." 99# CC 5.9: the compiler does often not notice that there is no way 100# to reach the closing brace of a function without either returning a proper 101# value or throwing an exception. 102# - hidef: "d::foo() hides the function b::foo()." We got still some cases of mixed 103# sal_uInt32 and ULONG usages which needs to be fixed. We can then remove this one 104CFLAGSWARNCC= 105CFLAGSWARNCXX=+w2 -erroff=doubunder,identexpected,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn,wnoretvalue,hidef,anonnotype,unassigned,badargtype2w 106CFLAGSWALLCC=$(CFLAGSWARNCC) 107CFLAGSWALLCXX=$(CFLAGSWARNCXX) 108CFLAGSWERRCC=-errwarn=%all 109CFLAGSWERRCXX=-xwe 110 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): 114MODULES_WITH_WARNINGS := \ 115 soldep 116 117STDOBJVCL=$(L)/salmain.o 118 119THREADLIB= 120LINK=$(CXX) 121LINKC=$(CC) 122 123# link against set of baseline libraries 124.IF "$(SYSBASE)"!="" 125C_RESTRICTIONFLAGS*=-xc99=none 126LD_OPTIONS+=-L$(SYSBASE)/usr/lib 127CDEFS+=-DSYSBASE="$(SYSBASE)" 128CFLAGSCC+=$(C_RESTRICTIONFLAGS) 129.EXPORT : LD_OPTIONS 130.ENDIF # "$(SYSBASE)"!="" 131 132# -z combreloc combines multiple relocation sections. Reduces overhead on startup 133# -norunpath prevents the compiler from recording his own libs in the runpath 134LINKFLAGSRUNPATH_URELIB=-R\''$$ORIGIN'\' 135LINKFLAGSRUNPATH_UREBIN=-R\''$$ORIGIN/../lib:$$ORIGIN'\' 136 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo 137LINKFLAGSRUNPATH_OOO=-R\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' 138LINKFLAGSRUNPATH_BRAND=-R\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' 139LINKFLAGSRUNPATH_OXT= 140LINKFLAGSRUNPATH_BOXT=-R\''$$ORIGIN/../../../basis-link/program'\' 141LINKFLAGSRUNPATH_NONE= 142LINKFLAGS=-m64 -w -mt -z combreloc -PIC -temp=/tmp -norunpath -library=stlport4 143LINKCFLAGS=-m64 -w -mt -z combreloc -norunpath 144 145# -z text force fatal error if non PIC code is linked into shared library. Such code 146# would be expensive on startup 147CHECKFORPIC =-z text 148LINKFLAGSSHLGUI=$(CHECKFORPIC) -G 149LINKFLAGSSHLCUI=$(CHECKFORPIC) -G 150 151# switches for dynamic and static linking 152LINKFLAGSDEFS*= -z defs 153STATIC = -Bstatic 154DIRECT = -Bdirect $(LINKFLAGSDEFS) 155DYNAMIC = -Bdynamic 156 157LINKFLAGSAPPGUI+=$(DIRECT) 158LINKFLAGSAPPCUI+=$(DIRECT) 159LINKFLAGSSHLGUI+=$(DIRECT) 160LINKFLAGSSHLCUI+=$(DIRECT) 161 162LINKFLAGSTACK= 163LINKFLAGSPROF= 164LINKFLAGSDEBUG= 165LINKFLAGSOPT= 166LINKVERSIONMAPFLAG=-M 167 168# mapfile for non-executable stack 169LINKFLAGSNOEXSTK*=$(LINKVERSIONMAPFLAG) $(SOLARENV)/src/solaris_noexstk.map 170LINKFLAGSAPPGUI+=$(LINKFLAGSNOEXSTK) 171LINKFLAGSAPPCUI+=$(LINKFLAGSNOEXSTK) 172 173APPLINKSTATIC=$(STATIC) 174APPLINKSHARED=$(DIRECT) 175APP_LINKTYPE= 176 177STDLIBCPP=-lCrun 178 179# reihenfolge der libs NICHT egal! 180STDOBJGUI= 181.IF "DBG_UTIL" != "" 182STDSLOGUI=#-lpthread 183.ELSE 184STDSLOGUI= 185.ENDIF 186STDOBJCUI= 187STDSLOCUI= 188 189# CPPRUNTIME - define where to place C++ runtime if required 190STDLIBGUIMT=$(DYNAMIC) -lpthread -lm 191STDLIBCUIMT=$(DYNAMIC) -lpthread -lm 192STDSHLGUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc 193STDSHLCUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc 194 195# libdl.so - no really an GUI library but required in this context 196STDLIBGUIMT+=-lX11 -ldl 197STDSHLGUIMT+=-lX11 -ldl 198 199# @@@ interposer needed for -Bdirect @@@ 200# LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract 201LIBSALCPPRT= 202 203.IF "$(USE_STLP_DEBUG)" != "" 204LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro_debug 205LIBSTLPORTST=$(STATIC) -lstlport_sunpro_debug $(DYNAMIC) 206.ELSE 207LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro 208LIBSTLPORTST=$(STATIC) -lstlport_sunpro $(DYNAMIC) 209.ENDIF # "$(USE_STLP_DEBUG)" != "" 210 211LIBMGR=CC 212LIBFLAGS=-xar -o 213 214IMPLIB= 215IMPLIBFLAGS= 216 217MAPSYM= 218MAPSYMFLAGS= 219IGNORE_SYMBOLS=S-ILP32 220 221RC=irc 222RCFLAGS=-fo$@ $(RCFILES) 223RCLINK= 224RCLINKFLAGS= 225RCSETVERSION= 226 227DLLPOSTFIX= 228 229DLLPRE=lib 230DLLPOST=.so 231 232LDUMP=cppfilt /b /n /o /p 233 234CFLAGSCXXSLO += 235CFLAGSCXXOBJ += 236 237LINKFLAGSAPPGUI+= 238LINKFLAGSSHLGUI+= 239LINKFLAGSAPPCUI+= 240LINKFLAGSSHLCUI+= 241 242BUILD64=1 243