2003-07-02 07:44:47 -05:00
|
|
|
#*************************************************************************
|
|
|
|
#
|
2008-04-10 11:55:24 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# Copyright 2008 by Sun Microsystems, Inc.
|
2003-07-02 07:44:47 -05:00
|
|
|
#
|
2008-04-10 11:55:24 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2003-07-02 07:44:47 -05:00
|
|
|
#
|
2008-04-10 11:55:24 -05:00
|
|
|
# $RCSfile: unxsoli4.mk,v $
|
2003-07-02 07:44:47 -05:00
|
|
|
#
|
2008-06-16 08:18:39 -05:00
|
|
|
# $Revision: 1.46 $
|
2003-07-02 07:44:47 -05:00
|
|
|
#
|
2008-04-10 11:55:24 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2003-07-02 07:44:47 -05:00
|
|
|
#
|
2008-04-10 11:55:24 -05:00
|
|
|
# OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
# only, as published by the Free Software Foundation.
|
2003-07-02 07:44:47 -05:00
|
|
|
#
|
2008-04-10 11:55:24 -05:00
|
|
|
# OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser General Public License version 3 for more details
|
|
|
|
# (a copy is included in the LICENSE file that accompanied this code).
|
2003-07-02 07:44:47 -05:00
|
|
|
#
|
2008-04-10 11:55:24 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# version 3 along with OpenOffice.org. If not, see
|
|
|
|
# <http://www.openoffice.org/license.html>
|
|
|
|
# for a copy of the LGPLv3 License.
|
2003-07-02 07:44:47 -05:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
ASM=/usr/ccs/bin/as
|
2004-08-12 09:11:47 -05:00
|
|
|
AFLAGS=-P
|
2003-07-02 07:44:47 -05:00
|
|
|
|
|
|
|
|
2008-06-06 06:01:36 -05:00
|
|
|
CDEFS+=-D_PTHREADS -DSYSV -DSUN -DSUN4 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DSTLPORT_VERSION=$(STLPORT_VER)
|
2003-07-02 07:44:47 -05:00
|
|
|
|
2003-12-17 11:11:11 -06:00
|
|
|
SOLAR_JAVA*=TRUE
|
2003-07-02 07:44:47 -05:00
|
|
|
.IF "$(SOLAR_JAVA)"!=""
|
|
|
|
JAVADEF=-DSOLAR_JAVA
|
|
|
|
JAVAFLAGSDEBUG=-g
|
|
|
|
.IF "$(debug)"==""
|
|
|
|
JAVA_RUNTIME=-ljava
|
|
|
|
.ELSE
|
|
|
|
JAVA_RUNTIME=-ljava_g
|
|
|
|
.ENDIF
|
|
|
|
.ENDIF
|
|
|
|
|
2005-07-11 09:34:40 -05:00
|
|
|
# architecture dependent flags for the C and C++ compiler that can be changed by
|
|
|
|
# exporting the variable ARCH_FLAGS="..." in the shell, which is used to start build
|
|
|
|
ARCH_FLAGS*=
|
|
|
|
|
2007-01-30 01:24:06 -06:00
|
|
|
CXX*=CC
|
|
|
|
CC*=cc
|
2003-07-02 07:44:47 -05:00
|
|
|
|
2006-07-05 16:05:19 -05:00
|
|
|
CFLAGS=$(PREENVCFLAGS) -c -temp=/tmp
|
2005-07-11 09:34:40 -05:00
|
|
|
CFLAGSCC=-xCC $(ARCH_FLAGS)
|
|
|
|
CFLAGSCXX=-features=no%altspell -library=no%Cstd $(ARCH_FLAGS)
|
2003-07-02 07:44:47 -05:00
|
|
|
|
2004-06-04 06:02:15 -05:00
|
|
|
# flags to enable build with symbols; required for crashdump feature
|
2004-10-22 09:07:52 -05:00
|
|
|
CFLAGSENABLESYMBOLS=-g0 -xs # was temporarily commented out, reenabled before Beta
|
2005-07-11 09:34:40 -05:00
|
|
|
CFLAGSENABLESYMBOLS_CC_ONLY=-g -xs # was temporarily commented out, reenabled before Beta
|
2004-06-04 06:02:15 -05:00
|
|
|
|
2003-07-02 07:44:47 -05:00
|
|
|
CFLAGSEXCEPTIONS=
|
|
|
|
CFLAGS_NO_EXCEPTIONS=-noex
|
|
|
|
|
2008-06-06 06:01:36 -05:00
|
|
|
CFLAGSOBJGUIMT=-KPIC -mt
|
|
|
|
CFLAGSOBJCUIMT=-KPIC -mt
|
|
|
|
CFLAGSSLOGUIMT=-KPIC -mt
|
|
|
|
CFLAGSSLOCUIMT=-KPIC -mt
|
2003-07-02 07:44:47 -05:00
|
|
|
CFLAGSPROF=-xpg
|
|
|
|
CFLAGSDEBUG=-g
|
|
|
|
CFLAGSDBGUTIL=
|
|
|
|
CFLAGSOPT=-xarch=generic -xO3 -xspace
|
|
|
|
CFLAGSNOOPT=
|
|
|
|
CFLAGSOUTOBJ=-o
|
|
|
|
|
2006-06-19 11:17:12 -05:00
|
|
|
# Warnings switched off for CXX:
|
|
|
|
# - doubunder: we have many identifiers containing double underscores, some of
|
|
|
|
# them in the stable UDK API we cannot change
|
|
|
|
# - inllargeuse: "function is too large and will not be expanded inline" is
|
|
|
|
# merely a hint
|
2006-08-01 05:47:49 -05:00
|
|
|
# - inllargeint: "function is too large to generate inline, consider writing
|
|
|
|
# it yourself" is merely a hint
|
2006-06-19 11:17:12 -05:00
|
|
|
# - notemsource: "could not find source for function" appears to be spurious
|
|
|
|
# - reftotemp: warns about calling non-const functions on temporary objects,
|
|
|
|
# something legally done by boost::scoped_array<T>::reset, for example
|
|
|
|
# (this_type(p).swap(*this))
|
2006-08-01 05:47:49 -05:00
|
|
|
# - truncwarn: "conversion of 64 bit type value to smaller type causes
|
|
|
|
# truncation" at least with CC 5.8 is reported only at the end of a
|
|
|
|
# compilation unit that uses std::hash_map<sal_Int64, sal_Int64> (see
|
|
|
|
# sfx2/source/toolbox/imgmgr.cxx:1.27) and thus unfortunately needs to be
|
|
|
|
# disabled globally
|
2006-06-19 11:17:12 -05:00
|
|
|
CFLAGSWARNCC=
|
2006-08-01 05:47:49 -05:00
|
|
|
CFLAGSWARNCXX=+w2 -erroff=doubunder,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn
|
2006-06-19 11:17:12 -05:00
|
|
|
CFLAGSWALLCC=$(CFLAGSWARNCC)
|
|
|
|
CFLAGSWALLCXX=$(CFLAGSWARNCXX)
|
|
|
|
CFLAGSWERRCC=-errwarn=%all
|
|
|
|
CFLAGSWERRCXX=-xwe
|
|
|
|
|
|
|
|
# Once all modules on this platform compile without warnings, set
|
|
|
|
# COMPILER_WARN_ERRORS=TRUE here instead of setting MODULES_WITH_WARNINGS (see
|
|
|
|
# settings.mk):
|
|
|
|
MODULES_WITH_WARNINGS := \
|
2007-09-27 01:49:30 -05:00
|
|
|
soldep
|
2003-07-02 07:44:47 -05:00
|
|
|
|
|
|
|
STDOBJVCL=$(L)$/salmain.o
|
|
|
|
|
|
|
|
THREADLIB=
|
|
|
|
.IF "$(PURIFY)"!=""
|
|
|
|
LINK=/usr/local/purify-4.2-solaris2/purify CC
|
|
|
|
.ELSE
|
2005-03-15 02:58:19 -06:00
|
|
|
LINK=$(CXX)
|
2003-07-02 07:44:47 -05:00
|
|
|
.ENDIF
|
2005-03-15 02:58:19 -06:00
|
|
|
LINKC=$(CC)
|
2003-07-02 07:44:47 -05:00
|
|
|
|
2004-10-22 03:29:37 -05:00
|
|
|
# link against set of baseline libraries
|
|
|
|
.IF "$(SYSBASE)"!=""
|
2006-10-10 05:22:13 -05:00
|
|
|
C_RESTRICTIONFLAGS*=-xc99=none
|
2004-10-22 03:29:37 -05:00
|
|
|
LD_OPTIONS+:=-L$(SYSBASE)$/usr/lib
|
2006-01-13 09:18:58 -06:00
|
|
|
CDEFS+=-DSYSBASE="$(SYSBASE)"
|
2005-12-28 09:55:56 -06:00
|
|
|
CFLAGSCC+=$(C_RESTRICTIONFLAGS)
|
2004-10-22 03:29:37 -05:00
|
|
|
.EXPORT : LD_OPTIONS
|
|
|
|
.ENDIF # "$(SYSBASE)"!=""
|
|
|
|
|
2003-07-02 07:44:47 -05:00
|
|
|
# -z combreloc combines multiple relocation sections. Reduces overhead on startup
|
|
|
|
# -norunpath prevents the compiler from recording his own libs in the runpath
|
2007-10-15 06:41:49 -05:00
|
|
|
LINKFLAGSRUNPATH_URELIB=-R\''$$ORIGIN'\'
|
|
|
|
LINKFLAGSRUNPATH_UREBIN=-R\''$$ORIGIN/../lib:$$ORIGIN'\'
|
|
|
|
#TODO: drop $ORIGIN once no URE executable is also shipped in OOo
|
|
|
|
LINKFLAGSRUNPATH_OOO=-R\''$$ORIGIN:$$ORIGIN/../ure-link/lib'\'
|
2008-03-18 07:11:28 -05:00
|
|
|
LINKFLAGSRUNPATH_BRAND=-R\''$$ORIGIN:$$ORIGIN/../basis-link/program:$$ORIGIN/../basis-link/ure-link/lib'\'
|
|
|
|
LINKFLAGSRUNPATH_OXT=
|
2008-06-09 06:40:21 -05:00
|
|
|
LINKFLAGSRUNPATH_NONE=
|
2007-10-15 06:41:49 -05:00
|
|
|
LINKFLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -library=no%Cstd
|
|
|
|
LINKCFLAGS=-w -mt -z combreloc -norunpath
|
2003-07-02 07:44:47 -05:00
|
|
|
|
2004-10-18 07:52:23 -05:00
|
|
|
# -z text force fatal error if non PIC code is linked into shared library. Such code
|
2003-07-02 07:44:47 -05:00
|
|
|
# would be expensive on startup
|
|
|
|
CHECKFORPIC =-z text
|
|
|
|
LINKFLAGSSHLGUI=$(CHECKFORPIC) -G
|
|
|
|
LINKFLAGSSHLCUI=$(CHECKFORPIC) -G
|
|
|
|
|
|
|
|
# switches for dynamic and static linking
|
|
|
|
LINKFLAGSDEFS*= -z defs
|
|
|
|
STATIC = -Bstatic
|
|
|
|
DIRECT = -Bdirect $(LINKFLAGSDEFS)
|
|
|
|
DYNAMIC = -Bdynamic
|
|
|
|
|
|
|
|
LINKFLAGSAPPGUI+=$(DIRECT)
|
|
|
|
LINKFLAGSAPPCUI+=$(DIRECT)
|
|
|
|
LINKFLAGSSHLGUI+=$(DIRECT)
|
|
|
|
LINKFLAGSSHLCUI+=$(DIRECT)
|
|
|
|
|
|
|
|
LINKFLAGSTACK=
|
|
|
|
LINKFLAGSPROF=-L$(COMPATH)/WS6U1/lib/libp -xpg -z allextract
|
|
|
|
LINKFLAGSDEBUG=
|
|
|
|
LINKFLAGSOPT=
|
|
|
|
LINKVERSIONMAPFLAG=-M
|
|
|
|
|
2006-11-01 07:07:08 -06:00
|
|
|
# mapfile for non-executable stack
|
|
|
|
LINKFLAGSNOEXSTK*=$(LINKVERSIONMAPFLAG) $(SOLARENV)/src/solaris_noexstk.map
|
|
|
|
LINKFLAGSAPPGUI+=$(LINKFLAGSNOEXSTK)
|
|
|
|
LINKFLAGSAPPCUI+=$(LINKFLAGSNOEXSTK)
|
|
|
|
|
2003-07-02 07:44:47 -05:00
|
|
|
APPLINKSTATIC=$(STATIC)
|
|
|
|
APPLINKSHARED=$(DIRECT)
|
|
|
|
APP_LINKTYPE=
|
|
|
|
|
2005-03-15 02:58:19 -06:00
|
|
|
STDLIBCPP=-lCrun
|
|
|
|
|
2003-07-02 07:44:47 -05:00
|
|
|
# reihenfolge der libs NICHT egal!
|
|
|
|
STDOBJGUI=
|
|
|
|
.IF "DBG_UTIL" != ""
|
|
|
|
STDSLOGUI=#-lpthread
|
|
|
|
.ELSE
|
|
|
|
STDSLOGUI=
|
|
|
|
.ENDIF
|
|
|
|
STDOBJCUI=
|
|
|
|
STDSLOCUI=
|
|
|
|
|
2006-08-01 05:47:49 -05:00
|
|
|
# CPPRUNTIME - define where to place C++ runtime if required
|
2003-07-02 07:44:47 -05:00
|
|
|
STDLIBGUIMT=$(DYNAMIC) -lpthread -lm
|
|
|
|
STDLIBCUIMT=$(DYNAMIC) -lpthread -lm
|
2005-03-15 02:58:19 -06:00
|
|
|
STDSHLGUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
|
|
|
|
STDSHLCUIMT=$(DYNAMIC) -lpthread CPPRUNTIME -lm -lc
|
2003-07-02 07:44:47 -05:00
|
|
|
|
2006-11-21 08:11:38 -06:00
|
|
|
# libdl.so - no really an GUI library but required in this context
|
|
|
|
STDLIBGUIMT+=-lX11 -ldl
|
|
|
|
STDSHLGUIMT+=-lX11 -ldl
|
2003-07-02 07:44:47 -05:00
|
|
|
|
|
|
|
# @@@ interposer needed for -Bdirect @@@
|
|
|
|
# LIBSALCPPRT*=-z allextract -lsalcpprt -z defaultextract
|
|
|
|
LIBSALCPPRT=
|
|
|
|
|
2005-09-05 03:03:21 -05:00
|
|
|
.IF "$(USE_STLP_DEBUG)" != ""
|
|
|
|
LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro_debug
|
|
|
|
LIBSTLPORTST=$(STATIC) -lstlport_sunpro_debug $(DYNAMIC)
|
|
|
|
.ELSE
|
2003-07-02 07:44:47 -05:00
|
|
|
LIBSTLPORT=$(DYNAMIC) -lstlport_sunpro
|
|
|
|
LIBSTLPORTST=$(STATIC) -lstlport_sunpro $(DYNAMIC)
|
2005-09-05 03:03:21 -05:00
|
|
|
.ENDIF # "$(USE_STLP_DEBUG)" != ""
|
2003-07-02 07:44:47 -05:00
|
|
|
|
|
|
|
LIBMGR=CC
|
2004-10-18 07:52:23 -05:00
|
|
|
LIBFLAGS=-xar -o
|
2003-07-02 07:44:47 -05:00
|
|
|
|
|
|
|
IMPLIB=
|
|
|
|
IMPLIBFLAGS=
|
|
|
|
|
|
|
|
MAPSYM=
|
|
|
|
MAPSYMFLAGS=
|
2008-06-16 08:18:39 -05:00
|
|
|
IGNORE_SYMBOLS=S-LP64
|
2003-07-02 07:44:47 -05:00
|
|
|
|
|
|
|
RC=irc
|
|
|
|
RCFLAGS=-fo$@ $(RCFILES)
|
|
|
|
RCLINK=
|
|
|
|
RCLINKFLAGS=
|
|
|
|
RCSETVERSION=
|
|
|
|
|
|
|
|
DLLPOSTFIX=si
|
|
|
|
|
|
|
|
DLLPRE=lib
|
|
|
|
DLLPOST=.so
|
|
|
|
|
|
|
|
LDUMP=cppfilt /b /n /o /p
|
|
|
|
|
2007-05-25 06:32:21 -05:00
|
|
|
CFLAGSCXXSLO +=
|
|
|
|
CFLAGSCXXOBJ +=
|
2003-07-02 07:44:47 -05:00
|
|
|
|
2007-05-25 06:32:21 -05:00
|
|
|
LINKFLAGSAPPGUI+=
|
|
|
|
LINKFLAGSSHLGUI+=
|
|
|
|
LINKFLAGSAPPCUI+=
|
|
|
|
LINKFLAGSSHLCUI+=
|