2004-07-30 09:24:01 -05:00
|
|
|
#*************************************************************************
|
|
|
|
#
|
2005-09-08 03:56:05 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2004-07-30 09:24:01 -05:00
|
|
|
#
|
2005-09-08 03:56:05 -05:00
|
|
|
# $RCSfile: unxlngi6.mk,v $
|
2004-07-30 09:24:01 -05:00
|
|
|
#
|
2006-10-12 07:50:09 -05:00
|
|
|
# $Revision: 1.24 $
|
2004-07-30 09:24:01 -05:00
|
|
|
#
|
2006-10-12 07:50:09 -05:00
|
|
|
# last change: $Author: obo $ $Date: 2006-10-12 13:50:09 $
|
2004-07-30 09:24:01 -05:00
|
|
|
#
|
2005-09-08 03:56:05 -05:00
|
|
|
# The Contents of this file are made available subject to
|
|
|
|
# the terms of GNU Lesser General Public License Version 2.1.
|
2004-07-30 09:24:01 -05:00
|
|
|
#
|
|
|
|
#
|
2005-09-08 03:56:05 -05:00
|
|
|
# GNU Lesser General Public License Version 2.1
|
|
|
|
# =============================================
|
|
|
|
# Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
# 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2004-07-30 09:24:01 -05:00
|
|
|
#
|
2005-09-08 03:56:05 -05:00
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License version 2.1, as published by the Free Software Foundation.
|
2004-07-30 09:24:01 -05:00
|
|
|
#
|
2005-09-08 03:56:05 -05:00
|
|
|
# This library 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 for more details.
|
2004-07-30 09:24:01 -05:00
|
|
|
#
|
2005-09-08 03:56:05 -05:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
# MA 02111-1307 USA
|
2004-07-30 09:24:01 -05:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
|
|
|
|
2005-10-05 05:34:22 -05:00
|
|
|
# mk file for unxlngi6
|
2004-07-30 09:24:01 -05:00
|
|
|
ASM=
|
|
|
|
AFLAGS=
|
|
|
|
|
2006-04-20 07:32:38 -05:00
|
|
|
SOLAR_JAVA*=
|
2004-07-30 09:24:01 -05:00
|
|
|
JAVAFLAGSDEBUG=-g
|
|
|
|
|
|
|
|
# filter for supressing verbose messages from linker
|
|
|
|
#not needed at the moment
|
|
|
|
#LINKOUTPUT_FILTER=" |& $(SOLARENV)$/bin$/msg_filter"
|
|
|
|
|
|
|
|
# _PTHREADS is needed for the stl
|
2006-01-20 03:50:02 -06:00
|
|
|
CDEFS+=$(PTHREAD_CFLAGS) -DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400
|
2004-07-30 09:24:01 -05:00
|
|
|
|
2004-10-27 09:17:33 -05:00
|
|
|
# enable visibility define in "sal/types.h"
|
|
|
|
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
|
|
|
|
CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
|
|
|
|
.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
|
|
|
|
|
2004-07-30 09:24:01 -05:00
|
|
|
# this is a platform with JAVA support
|
|
|
|
.IF "$(SOLAR_JAVA)"!=""
|
|
|
|
JAVADEF=-DSOLAR_JAVA
|
|
|
|
.IF "$(debug)"==""
|
|
|
|
JAVA_RUNTIME=-ljava
|
|
|
|
.ELSE
|
|
|
|
JAVA_RUNTIME=-ljava_g
|
|
|
|
.ENDIF
|
|
|
|
.ENDIF
|
|
|
|
|
2005-07-11 09:31:14 -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*=-mtune=pentiumpro
|
|
|
|
|
2004-07-30 09:24:01 -05:00
|
|
|
# name of C++ Compiler
|
|
|
|
CXX*=g++
|
|
|
|
# name of C Compiler
|
|
|
|
CC*=gcc
|
|
|
|
.IF "$(SYSBASE)"!=""
|
|
|
|
CFLAGS_SYSBASE:=-isystem $(SYSBASE)$/usr$/include
|
|
|
|
CXX+:=$(CFLAGS_SYSBASE)
|
|
|
|
CC+:=$(CFLAGS_SYSBASE)
|
|
|
|
.ENDIF # "$(SYSBASE)"!=""
|
2006-07-05 16:02:36 -05:00
|
|
|
CFLAGS+=-fmessage-length=0 -c
|
2004-07-30 09:24:01 -05:00
|
|
|
|
|
|
|
# flags to enable build with symbols; required for crashdump feature
|
|
|
|
.IF "$(ENABLE_SYMBOLS)"=="SMALL"
|
|
|
|
CFLAGSENABLESYMBOLS=-g1
|
|
|
|
.ELSE
|
2004-10-18 07:52:23 -05:00
|
|
|
CFLAGSENABLESYMBOLS=-g # was temporarily commented out, reenabled before Beta
|
2004-08-12 09:20:18 -05:00
|
|
|
|
2004-07-30 09:24:01 -05:00
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
# flags for the C++ Compiler
|
2005-07-11 09:31:14 -05:00
|
|
|
CFLAGSCC= -pipe $(ARCH_FLAGS)
|
2004-07-30 09:24:01 -05:00
|
|
|
# Flags for enabling exception handling
|
|
|
|
CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
|
|
|
|
# Flags for disabling exception handling
|
|
|
|
CFLAGS_NO_EXCEPTIONS=-fno-exceptions
|
|
|
|
|
|
|
|
# -fpermissive should be removed as soon as possible
|
2005-07-11 09:31:14 -05:00
|
|
|
CFLAGSCXX= -pipe $(ARCH_FLAGS)
|
2005-02-11 08:29:10 -06:00
|
|
|
PICSWITCH:=-fpic
|
2005-02-16 09:28:27 -06:00
|
|
|
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
|
|
|
|
CFLAGSCXX += -fvisibility-inlines-hidden
|
|
|
|
.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
|
|
|
|
|
2004-07-30 09:24:01 -05:00
|
|
|
# Compiler flags for compiling static object in single threaded environment with graphical user interface
|
|
|
|
CFLAGSOBJGUIST=
|
|
|
|
# Compiler flags for compiling static object in single threaded environment with character user interface
|
|
|
|
CFLAGSOBJCUIST=
|
|
|
|
# Compiler flags for compiling static object in multi threaded environment with graphical user interface
|
|
|
|
CFLAGSOBJGUIMT=
|
|
|
|
# Compiler flags for compiling static object in multi threaded environment with character user interface
|
|
|
|
CFLAGSOBJCUIMT=
|
|
|
|
# Compiler flags for compiling shared object in multi threaded environment with graphical user interface
|
2005-02-11 08:29:10 -06:00
|
|
|
CFLAGSSLOGUIMT=$(PICSWITCH)
|
2004-07-30 09:24:01 -05:00
|
|
|
# Compiler flags for compiling shared object in multi threaded environment with character user interface
|
2005-02-11 08:29:10 -06:00
|
|
|
CFLAGSSLOCUIMT=$(PICSWITCH)
|
2004-07-30 09:24:01 -05:00
|
|
|
# Compiler flags for profiling
|
|
|
|
CFLAGSPROF=
|
|
|
|
# Compiler flags for debugging
|
|
|
|
CFLAGSDEBUG=-g
|
|
|
|
CFLAGSDBGUTIL=
|
2005-10-05 05:34:22 -05:00
|
|
|
# Compiler flags for enabling optimizations
|
2004-07-30 09:24:01 -05:00
|
|
|
.IF "$(PRODUCT)"!=""
|
|
|
|
CFLAGSOPT=-Os -fno-strict-aliasing # optimizing for products
|
|
|
|
.ELSE # "$(PRODUCT)"!=""
|
|
|
|
CFLAGSOPT= # no optimizing for non products
|
|
|
|
.ENDIF # "$(PRODUCT)"!=""
|
2005-10-05 05:34:22 -05:00
|
|
|
# Compiler flags for disabling optimizations
|
2004-07-30 09:24:01 -05:00
|
|
|
CFLAGSNOOPT=-O0
|
2005-10-05 05:34:22 -05:00
|
|
|
# Compiler flags for describing the output path
|
2004-07-30 09:24:01 -05:00
|
|
|
CFLAGSOUTOBJ=-o
|
2006-06-19 11:14:59 -05:00
|
|
|
|
|
|
|
# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
|
|
|
|
CFLAGSWARNCC=-Wall -Wextra -Wendif-labels
|
|
|
|
CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wshadow -Wno-ctor-dtor-privacy \
|
|
|
|
-Wno-non-virtual-dtor
|
|
|
|
CFLAGSWALLCC=$(CFLAGSWARNCC)
|
|
|
|
CFLAGSWALLCXX=$(CFLAGSWARNCXX)
|
|
|
|
CFLAGSWERRCC=-Werror
|
|
|
|
|
|
|
|
# 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 := \
|
|
|
|
b_server \
|
|
|
|
basctl \
|
|
|
|
chart2 \
|
|
|
|
devtools \
|
|
|
|
extensions \
|
|
|
|
filter \
|
|
|
|
lingu \
|
|
|
|
r_tools \
|
|
|
|
sc \
|
|
|
|
sd \
|
|
|
|
starmath \
|
|
|
|
sw \
|
|
|
|
writerperfect \
|
|
|
|
xmlsecurity
|
2004-07-30 09:24:01 -05:00
|
|
|
|
|
|
|
# switches for dynamic and static linking
|
|
|
|
STATIC = -Wl,-Bstatic
|
|
|
|
DYNAMIC = -Wl,-Bdynamic
|
|
|
|
|
|
|
|
# name of linker
|
|
|
|
LINK*=$(CXX)
|
2005-03-15 02:57:01 -06:00
|
|
|
LINKC*=$(CC)
|
2004-07-30 09:24:01 -05:00
|
|
|
|
|
|
|
# default linker flags
|
|
|
|
LINKFLAGSDEFS*=-Wl,-z,defs
|
|
|
|
LINKFLAGSRUNPATH*=-Wl,-rpath,\''$$ORIGIN'\'
|
2005-04-18 08:02:11 -05:00
|
|
|
LINKFLAGS=-Wl,-z,combreloc $(LINKFLAGSDEFS) $(LINKFLAGSRUNPATH)
|
2004-07-30 09:24:01 -05:00
|
|
|
|
|
|
|
# linker flags for linking applications
|
|
|
|
LINKFLAGSAPPGUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
|
|
|
|
LINKFLAGSAPPCUI= -Wl,-export-dynamic -Wl,--noinhibit-exec
|
|
|
|
|
|
|
|
# linker flags for linking shared libraries
|
|
|
|
LINKFLAGSSHLGUI= -shared
|
|
|
|
LINKFLAGSSHLCUI= -shared
|
|
|
|
|
|
|
|
LINKFLAGSTACK=
|
|
|
|
LINKFLAGSPROF=
|
|
|
|
LINKFLAGSDEBUG=-g
|
|
|
|
LINKFLAGSOPT=
|
|
|
|
|
|
|
|
# linker flags for optimization (symbol hashtable)
|
|
|
|
# for now, applied to symbol scoped libraries, only
|
|
|
|
LINKFLAGSOPTIMIZE*=-Wl,-O1
|
|
|
|
LINKVERSIONMAPFLAG=$(LINKFLAGSOPTIMIZE) -Wl,--version-script
|
|
|
|
|
|
|
|
SONAME_SWITCH=-Wl,-h
|
|
|
|
|
|
|
|
# Sequence of libs does matter !
|
|
|
|
|
|
|
|
STDLIBCPP=-lstdc++
|
|
|
|
|
|
|
|
# default objectfilenames to link
|
2004-10-28 10:21:05 -05:00
|
|
|
STDOBJVCL=$(L)$/salmain.o
|
2004-07-30 09:24:01 -05:00
|
|
|
STDOBJGUI=
|
|
|
|
STDSLOGUI=
|
|
|
|
STDOBJCUI=
|
|
|
|
STDSLOCUI=
|
|
|
|
|
2006-01-31 11:27:58 -06:00
|
|
|
.IF "$(ALLOC)" == "TCMALLOC"
|
|
|
|
STDLIBCUIST+=-ltcmalloc
|
|
|
|
STDLIBGUIMT+=-ltcmalloc
|
|
|
|
STDLIBCUIMT+=-ltcmalloc
|
|
|
|
STDLIBGUIST+=-ltcmalloc
|
|
|
|
STDSHLGUIMT+=-ltcmalloc
|
|
|
|
STDSHLCUIMT+=-ltcmalloc
|
|
|
|
STDSHLGUIST+=-ltcmalloc
|
|
|
|
STDSHLCUIST+=-ltcmalloc
|
|
|
|
.ENDIF
|
|
|
|
|
2004-07-30 09:24:01 -05:00
|
|
|
# libraries for linking applications
|
2006-01-31 11:27:58 -06:00
|
|
|
STDLIBCUIST+=-ldl -lm
|
|
|
|
STDLIBGUIMT+=-lX11 -ldl -lpthread -lm
|
|
|
|
STDLIBCUIMT+=-ldl -lpthread -lm
|
|
|
|
STDLIBGUIST+=-lX11 -ldl -lm
|
2004-07-30 09:24:01 -05:00
|
|
|
# libraries for linking shared libraries
|
2006-01-31 11:27:58 -06:00
|
|
|
STDSHLGUIMT+=-lX11 -lXext -ldl -lpthread -lm
|
|
|
|
STDSHLCUIMT+=-ldl -lpthread -lm
|
|
|
|
STDSHLGUIST+=-lX11 -lXext -ldl -lm
|
|
|
|
STDSHLCUIST+=-ldl -lm
|
2004-07-30 09:24:01 -05:00
|
|
|
|
|
|
|
LIBSALCPPRT*=-Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
|
|
|
|
|
2005-09-05 03:03:05 -05:00
|
|
|
.IF "$(USE_STLP_DEBUG)" != ""
|
|
|
|
LIBSTLPORT=$(DYNAMIC) -lstlport_gcc_stldebug
|
|
|
|
LIBSTLPORTST=$(STATIC) -lstlport_gcc_stldebug $(DYNAMIC)
|
|
|
|
.ELSE # "$(USE_STLP_DEBUG)" != ""
|
2004-07-30 09:24:01 -05:00
|
|
|
LIBSTLPORT=$(DYNAMIC) -lstlport_gcc
|
|
|
|
LIBSTLPORTST=$(STATIC) -lstlport_gcc $(DYNAMIC)
|
2005-09-05 03:03:05 -05:00
|
|
|
.ENDIF # "$(USE_STLP_DEBUG)" != ""
|
2004-07-30 09:24:01 -05:00
|
|
|
|
|
|
|
#FILLUPARC=$(STATIC) -lsupc++ $(DYNAMIC)
|
|
|
|
|
|
|
|
# name of library manager
|
|
|
|
LIBMGR=ar
|
|
|
|
LIBFLAGS=-r
|
|
|
|
|
|
|
|
# tool for generating import libraries
|
|
|
|
IMPLIB=
|
|
|
|
IMPLIBFLAGS=
|
|
|
|
|
|
|
|
MAPSYM=
|
|
|
|
MAPSYMFLAGS=
|
|
|
|
|
|
|
|
RC=irc
|
|
|
|
RCFLAGS=-fo$@ $(RCFILES)
|
|
|
|
RCLINK=
|
|
|
|
RCLINKFLAGS=
|
|
|
|
RCSETVERSION=
|
|
|
|
|
|
|
|
# platform specific identifier for shared libs
|
|
|
|
DLLPOSTFIX=li
|
|
|
|
DLLPRE=lib
|
|
|
|
DLLPOST=.so
|
|
|
|
|