1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24 25ASM=/usr/ccs/bin/as 26AFLAGS=-P 27 28CDEFS+=-D_PTHREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DSTLPORT_VERSION=$(STLPORT_VER) 29 30SOLAR_JAVA*=TRUE 31.IF "$(SOLAR_JAVA)"!="" 32JAVADEF=-DSOLAR_JAVA 33JAVAFLAGSDEBUG=-g 34.IF "$(debug)"=="" 35JAVA_RUNTIME=-ljava 36.ELSE 37JAVA_RUNTIME=-ljava_g 38.ENDIF 39.ENDIF 40 41# architecture dependent flags for the C and C++ compiler that can be changed by 42# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build 43ARCH_FLAGS*="-features=rvalueref" 44 45CXX*=CC 46CC*=cc 47 48CFLAGS=$(PREENVCFLAGS) -c -temp=/tmp 49CFLAGSCC=-xCC $(ARCH_FLAGS) 50CFLAGSCXX=-features=no%altspell -library=no%Cstd $(ARCH_FLAGS) 51 52# flags to enable build with symbols; required for crashdump feature 53CFLAGSENABLESYMBOLS=-g0 -xs # was temporarily commented out, reenabled before Beta 54CFLAGSENABLESYMBOLS_CC_ONLY=-g -xs # was temporarily commented out, reenabled before Beta 55 56CFLAGSEXCEPTIONS= 57CFLAGS_NO_EXCEPTIONS=-noex 58 59CFLAGSOBJGUIMT=-KPIC -mt 60CFLAGSOBJCUIMT=-KPIC -mt 61CFLAGSSLOGUIMT=-KPIC -mt 62CFLAGSSLOCUIMT=-KPIC -mt 63CFLAGSPROF=-xpg 64CFLAGSDEBUG=-g 65CFLAGSDBGUTIL= 66CFLAGSOPT=-xarch=generic -xO3 67CFLAGSNOOPT= 68CFLAGSOUTOBJ=-o 69 70# Warnings switched off for CXX: 71# - doubunder: we have many identifiers containing double underscores, some of 72# them in the stable UDK API we cannot change 73# - identexpected: Identifier expected instead of "}" 74# if an enum ends with a comma before the '}' 75# this warning does not seem to heed #pragma disable_warn, and is not helpful 76# - inllargeuse: "function is too large and will not be expanded inline" is 77# merely a hint 78# - inllargeint: "function is too large to generate inline, consider writing 79# it yourself" is merely a hint 80# - notemsource: "could not find source for function" appears to be spurious 81# - reftotemp: warns about calling non-const functions on temporary objects, 82# something legally done by boost::scoped_array<T>::reset, for example 83# (this_type(p).swap(*this)) 84# - truncwarn: "conversion of 64 bit type value to smaller type causes 85# truncation" at least with CC 5.8 is reported only at the end of a 86# compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see 87# sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be 88# disabled globally 89# - wnoretvalue: warning about the last statement of a function not 90# returning a value. Unfortunately triggers on perfectly acceptable 91# code, for example if the last statement in is a throw statement 92# - anonnotype: Warns if a type is declared in an anonymous union. Temporary 93# disabled until issue i97325 is fixed. Note: The compiler is actually 94# right about this warning, the C++ standard is explicit about this. 95CFLAGSWARNCC= 96CFLAGSWARNCXX=+w2 -erroff=doubunder,identexpected,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn,wnoretvalue,anonnotype 97CFLAGSWALLCC=$(CFLAGSWARNCC) 98CFLAGSWALLCXX=$(CFLAGSWARNCXX) 99CFLAGSWERRCC=-errwarn=%all 100CFLAGSWERRCXX=-xwe 101 102# Once all modules on this platform compile without warnings, set 103# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see 104# settings.mk): 105MODULES_WITH_WARNINGS := \ 106 soldep 107 108STDOBJVCL=$(L)/salmain.o 109 110THREADLIB= 111.IF "$(PURIFY)"!="" 112LINK=/usr/local/purify-4.2-solaris2/purify CC 113.ELSE 114LINK=$(CXX) 115.ENDIF 116LINKC=$(CC) 117 118# link against set of baseline libraries 119.IF "$(SYSBASE)"!="" 120C_RESTRICTIONFLAGS*=-xc99=none 121#LD_OPTIONS+:=-L$(SYSBASE)/usr/lib 122CDEFS+=-DSYSBASE="$(SYSBASE)" 123CFLAGSCC+=$(C_RESTRICTIONFLAGS) 124#.EXPORT : LD_OPTIONS 125.ENDIF # "$(SYSBASE)"!="" 126 127# -z combreloc combines multiple relocation sections. Reduces overhead on startup 128# -norunpath prevents the compiler from recording his own libs in the runpath 129LINKFLAGSRUNPATH_URELIB=-R\''$$ORIGIN'\' 130LINKFLAGSRUNPATH_UREBIN=-R\''$$ORIGIN'\' 131#LINKFLAGSRUNPATH_UREBIN=-R\''$$ORIGIN/../lib:$$ORIGIN'\' 132 #TODO: drop $ORIGIN once no URE executable is also shipped in OOo 133LINKFLAGSRUNPATH_OOO=-R\''$$ORIGIN'\' 134LINKFLAGSRUNPATH_SDK=-R\''$$ORIGIN'\' 135LINKFLAGSRUNPATH_BRAND=-R\''$$ORIGIN'\' 136#LINKFLAGSRUNPATH_OOO=-R\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\' 137#LINKFLAGSRUNPATH_SDK=-R\''$$ORIGIN/../../ure-link/lib'\' 138#LINKFLAGSRUNPATH_BRAND=-R\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\' 139LINKFLAGSRUNPATH_OXT= 140LINKFLAGSRUNPATH_BOXT=-R\''$$ORIGIN'\' 141#LINKFLAGSRUNPATH_BOXT=-R\''$$ORIGIN/../../../basis-link/program'\' 142LINKFLAGSRUNPATH_NONE= 143LINKFLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -library=no%Cstd 144LINKCFLAGS=-w -mt -z combreloc -norunpath 145 146# -z text force fatal error if non PIC code is linked into shared library. Such code 147# would be expensive on startup 148CHECKFORPIC =-z text 149LINKFLAGSSHLGUI=$(CHECKFORPIC) -G 150LINKFLAGSSHLCUI=$(CHECKFORPIC) -G 151 152# switches for dynamic and static linking 153LINKFLAGSDEFS*= -z defs 154STATIC = -Bstatic 155DIRECT = -Bdirect $(LINKFLAGSDEFS) 156DYNAMIC = -Bdynamic 157 158LINKFLAGSAPPGUI+=$(DIRECT) 159LINKFLAGSAPPCUI+=$(DIRECT) 160LINKFLAGSSHLGUI+=$(DIRECT) 161LINKFLAGSSHLCUI+=$(DIRECT) 162 163LINKFLAGSTACK= 164LINKFLAGSPROF=-L$(COMPATH)/WS6U1/lib/libp -xpg -z allextract 165LINKFLAGSDEBUG= 166LINKFLAGSOPT= 167LINKVERSIONMAPFLAG=-M 168 169# mapfile for non-executable stack 170LINKFLAGSNOEXSTK*=$(LINKVERSIONMAPFLAG) $(SOLARENV)/src/solaris_noexstk.map 171LINKFLAGSAPPGUI+=$(LINKFLAGSNOEXSTK) 172LINKFLAGSAPPCUI+=$(LINKFLAGSNOEXSTK) 173 174APPLINKSTATIC=$(STATIC) 175APPLINKSHARED=$(DIRECT) 176APP_LINKTYPE= 177 178STDLIBCPP=-lCrun 179 180# reihenfolge der libs NICHT egal! 181STDOBJGUI= 182.IF "DBG_UTIL" != "" 183STDSLOGUI=#-lpthread 184.ELSE 185STDSLOGUI= 186.ENDIF 187STDOBJCUI= 188STDSLOCUI= 189 190# CPPRUNTIME - define where to place C++ runtime if required 191STDLIBGUIMT=$(DYNAMIC) -lpthread -lm 192STDLIBCUIMT=$(DYNAMIC) -lpthread -lm 193STDSHLGUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc 194STDSHLCUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc 195 196# libdl.so - no really an GUI library but required in this context 197STDLIBGUIMT+=-ldl 198STDSHLGUIMT+=-ldl 199X11LINK_DYNAMIC = -lXext -lX11 200 201# @@@ interposer needed for -Bdirect @@@ 202# LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract 203LIBSALCPPRT= 204 205.IF "$(USE_STLP_DEBUG)" != "" 206LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro_debug 207LIBSTLPORTST=$(STATIC) -lstlport_sunpro_debug $(DYNAMIC) 208.ELSE 209LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro 210LIBSTLPORTST=$(STATIC) -lstlport_sunpro $(DYNAMIC) 211.ENDIF # "$(USE_STLP_DEBUG)" != "" 212 213LIBMGR=CC 214LIBFLAGS=-xar -o 215 216IMPLIB= 217IMPLIBFLAGS= 218 219MAPSYM= 220MAPSYMFLAGS= 221IGNORE_SYMBOLS=S-LP64 222 223RC=irc 224RCFLAGS=-fo$@ $(RCFILES) 225RCLINK= 226RCLINKFLAGS= 227RCSETVERSION= 228 229DLLPOSTFIX= 230 231DLLPRE=lib 232DLLPOST=.so 233 234LDUMP=cppfilt /b /n /o /p 235 236CFLAGSCXXSLO += 237CFLAGSCXXOBJ += 238 239LINKFLAGSAPPGUI+= 240LINKFLAGSSHLGUI+= 241LINKFLAGSAPPCUI+= 242LINKFLAGSSHLCUI+= 243