2006-03-08 07:13:02 -06:00
|
|
|
#*************************************************************************
|
|
|
|
#
|
2008-04-10 11:52:38 -05:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# Copyright 2008 by Sun Microsystems, Inc.
|
2006-03-08 07:13:02 -06:00
|
|
|
#
|
2008-04-10 11:52:38 -05:00
|
|
|
# OpenOffice.org - a multi-platform office productivity suite
|
2006-03-08 07:13:02 -06:00
|
|
|
#
|
2008-04-10 11:52:38 -05:00
|
|
|
# $RCSfile: unxmacx.mk,v $
|
2006-03-08 07:13:02 -06:00
|
|
|
#
|
2008-05-28 01:55:51 -05:00
|
|
|
# $Revision: 1.32 $
|
2006-03-08 07:13:02 -06:00
|
|
|
#
|
2008-04-10 11:52:38 -05:00
|
|
|
# This file is part of OpenOffice.org.
|
2006-03-08 07:13:02 -06:00
|
|
|
#
|
2008-04-10 11:52:38 -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.
|
2006-03-08 07:13:02 -06:00
|
|
|
#
|
2008-04-10 11:52:38 -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).
|
2006-03-08 07:13:02 -06:00
|
|
|
#
|
2008-04-10 11:52:38 -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.
|
2006-03-08 07:13:02 -06:00
|
|
|
#
|
|
|
|
#*************************************************************************
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Platform MAKEFILE for Mac OS X and Darwin on both PowerPC and Intel
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# PROCESSOR_DEFINES and DLLPOSTFIX are defined in the particular platform file
|
|
|
|
|
|
|
|
# DARWIN_VERSION holds the Darwin version in the format: 000000. For example,
|
|
|
|
# if the Darwin version is 1.3.7, DARWIN_VERSION will be set to 010307.
|
|
|
|
# Not used now, comment it out. Remove it after some time.
|
|
|
|
# DARWIN_VERSION=$(shell -/bin/sh -c "uname -r | sed 's/\./ /g' | xargs printf %2.2i%2.2i%2.2i")
|
|
|
|
|
|
|
|
ASM=
|
|
|
|
AFLAGS=
|
|
|
|
LINKOUTPUT_FILTER=
|
|
|
|
|
|
|
|
# Definitions that we may need on the compile line.
|
|
|
|
# -D_PTHREADS and -D_REENTRANT are needed for STLport, and must be specified when
|
|
|
|
# compiling STLport sources too, either internally or externally.
|
2007-12-12 06:21:33 -06:00
|
|
|
CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY $(PROCESSOR_DEFINES) -DSTLPORT_VERSION=$(STLPORT_VER) -D_USE_NAMESPACE=1
|
2008-03-19 08:39:55 -05:00
|
|
|
.IF "$(GUIBASE)"=="unx" && "$(USE_SYSTEM_STL)"!="YES"
|
2006-03-08 07:13:02 -06:00
|
|
|
CDEFS+= -DX_LOCALE
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
# Name of library where static data members are initialized
|
|
|
|
# STATICLIBNAME=static$(DLLPOSTFIX)
|
|
|
|
# STATICLIB=-l$(STATICLIBNAME)
|
|
|
|
|
|
|
|
# enable visibility define in "sal/types.h"
|
|
|
|
.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
|
|
|
|
CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE
|
|
|
|
.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
|
|
|
|
|
|
|
|
|
|
|
|
# MacOS X specific Java compilation/link flags
|
|
|
|
SOLAR_JAVA*=TRUE
|
|
|
|
.IF "$(SOLAR_JAVA)"!=""
|
|
|
|
JAVADEF=-DSOLAR_JAVA
|
|
|
|
JAVAFLAGSDEBUG=-g
|
|
|
|
JAVA_RUNTIME=-framework JavaVM
|
|
|
|
.ENDIF
|
|
|
|
|
|
|
|
# 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*=
|
|
|
|
|
|
|
|
# Specify the compiler to use. NOTE: MacOS X should always specify
|
|
|
|
# c++ for C++ compilation as it does certain C++ specific things
|
|
|
|
# behind the scenes for us.
|
|
|
|
# CC = C++ compiler to use
|
|
|
|
# cc = C compiler to use
|
|
|
|
# objc = Objective C compiler to use
|
2008-01-14 08:49:15 -06:00
|
|
|
# objcpp = Objective C++ compiler to use
|
2006-03-08 07:13:02 -06:00
|
|
|
CXX*=g++
|
|
|
|
CC*=gcc
|
2008-01-14 08:49:15 -06:00
|
|
|
objc*=gcc
|
|
|
|
objcpp*=g++
|
2006-03-08 07:13:02 -06:00
|
|
|
|
2008-01-04 08:02:02 -06:00
|
|
|
CFLAGS=-fsigned-char -fmessage-length=0 -malign-natural -c $(EXTRA_CFLAGS)
|
2006-03-08 07:13:02 -06:00
|
|
|
|
2008-01-14 08:49:15 -06:00
|
|
|
.IF "$(DISABLE_DEPRECATION_WARNING)" == "TRUE"
|
|
|
|
CFLAGS+=-Wno-deprecated-declarations
|
|
|
|
.ENDIF
|
2006-03-08 07:13:02 -06:00
|
|
|
# ---------------------------------
|
|
|
|
# Compilation flags
|
|
|
|
# ---------------------------------
|
|
|
|
# Normal C compilation flags
|
|
|
|
CFLAGSCC=-pipe -fsigned-char -malign-natural $(ARCH_FLAGS)
|
|
|
|
|
|
|
|
# Normal Objective C compilation flags
|
2007-07-05 03:04:21 -05:00
|
|
|
#OBJCFLAGS=-no-precomp
|
|
|
|
OBJCFLAGS=-fobjc-exceptions
|
|
|
|
OBJCXXFLAGS=-x objective-c++ -fobjc-exceptions
|
2006-03-08 07:13:02 -06:00
|
|
|
|
|
|
|
# Comp Flags for files that need exceptions enabled (C and C++)
|
|
|
|
CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
|
|
|
|
|
|
|
|
# Comp Flags for files that do not need exceptions enabled (C and C++)
|
|
|
|
CFLAGS_NO_EXCEPTIONS=-fno-exceptions
|
|
|
|
|
|
|
|
# Normal C++ compilation flags
|
|
|
|
CFLAGSCXX=-pipe -malign-natural -fsigned-char -Wno-long-double $(ARCH_FLAGS)
|
|
|
|
CFLAGSCXX+= -Wno-ctor-dtor-privacy
|
2007-10-09 09:05:16 -05:00
|
|
|
|
2006-03-08 07:13:02 -06:00
|
|
|
PICSWITCH:=-fPIC
|
|
|
|
# Other flags
|
|
|
|
CFLAGSOBJGUIMT=$(PICSWITCH) -fno-common
|
|
|
|
CFLAGSOBJCUIMT=$(PICSWITCH) -fno-common
|
|
|
|
CFLAGSSLOGUIMT=$(PICSWITCH) -fno-common
|
|
|
|
CFLAGSSLOCUIMT=$(PICSWITCH) -fno-common
|
|
|
|
CFLAGSPROF=
|
|
|
|
|
|
|
|
# Flag for including debugging information in object files
|
|
|
|
CFLAGSDEBUG=-g
|
|
|
|
CFLAGSDBGUTIL=
|
|
|
|
|
|
|
|
# Flag to specify output file to compiler/linker
|
|
|
|
CFLAGSOUTOBJ=-o
|
|
|
|
|
2007-05-10 09:11:43 -05:00
|
|
|
# Flags to enable precompiled headers
|
|
|
|
CFLAGS_CREATE_PCH=-x c++-header -I$(INCPCH) -DPRECOMPILED_HEADERS
|
|
|
|
CFLAGS_USE_PCH=-I$(SLO)$/pch -DPRECOMPILED_HEADERS -Winvalid-pch
|
|
|
|
CFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)$/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch
|
|
|
|
|
2006-03-08 07:13:02 -06:00
|
|
|
# ---------------------------------
|
|
|
|
# Optimization flags
|
|
|
|
# ---------------------------------
|
|
|
|
CFLAGSOPT=-O2 -fno-strict-aliasing
|
|
|
|
CFLAGSNOOPT=-O0
|
|
|
|
|
2006-10-24 07:26:19 -05:00
|
|
|
# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
|
2008-03-18 07:11:14 -05:00
|
|
|
# -Wshadow does not work for C++ as /usr/include/c++/4.0.0/ext/hashtable.h
|
|
|
|
# l. 717 contains a declaration of __cur2 shadowing the declaration at l. 705,
|
|
|
|
# in template code for which a #pragma gcc system_header would not work:
|
2006-11-08 07:03:43 -06:00
|
|
|
# -Wextra doesn not work for gcc-3.3
|
|
|
|
CFLAGSWARNCC=-Wall -Wendif-labels
|
2008-03-18 07:11:14 -05:00
|
|
|
CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor
|
2006-10-24 07:26:19 -05:00
|
|
|
CFLAGSWALLCC=$(CFLAGSWARNCC)
|
|
|
|
CFLAGSWALLCXX=$(CFLAGSWARNCXX)
|
|
|
|
CFLAGSWERRCC=-Werror
|
|
|
|
|
2008-05-28 01:55:51 -05:00
|
|
|
# All modules on this platform compile without warnings.
|
|
|
|
# If you need to set MODULES_WITH_WARNINGS here, comment
|
|
|
|
# COMPILER_WARN_ERRORS=TRUE here (see settings.mk):
|
|
|
|
COMPILER_WARN_ERRORS=TRUE
|
2006-10-24 07:26:19 -05:00
|
|
|
|
2008-01-04 08:02:02 -06:00
|
|
|
#special settings form environment
|
|
|
|
CDEFS+=$(EXTRA_CDEFS)
|
|
|
|
|
2006-03-08 07:13:02 -06:00
|
|
|
STDLIBCPP=-lstdc++
|
|
|
|
|
|
|
|
# ---------------------------------
|
|
|
|
# STLport library names
|
|
|
|
# ---------------------------------
|
2007-04-16 05:12:53 -05:00
|
|
|
.IF "$(USE_STLP_DEBUG)" != ""
|
2007-12-12 06:21:33 -06:00
|
|
|
.IF "$(STLPORT_VER)" >= "500"
|
|
|
|
LIBSTLPORT=-lstlportstlg
|
|
|
|
LIBSTLPORTST=$(STATIC) -lstlportstlg
|
|
|
|
.ELSE
|
2007-04-16 05:12:53 -05:00
|
|
|
LIBSTLPORT=-lstlport_gcc_stldebug
|
|
|
|
LIBSTLPORTST=$(SOLARVERSION)$/$(INPATH)$/lib$/libstlport_gcc_stldebug.a
|
2007-12-12 06:21:33 -06:00
|
|
|
.ENDIF
|
2007-04-16 05:12:53 -05:00
|
|
|
.ELSE # "$(USE_STLP_DEBUG" != ""
|
2007-12-12 06:21:33 -06:00
|
|
|
.IF "$(STLPORT_VER)" >= "500"
|
|
|
|
LIBSTLPORT=-lstlport
|
|
|
|
LIBSTLPORTST=$(STATIC) -lstlport
|
|
|
|
.ELSE
|
2006-03-08 07:13:02 -06:00
|
|
|
LIBSTLPORT=-lstlport_gcc
|
2007-04-16 05:12:53 -05:00
|
|
|
LIBSTLPORTST=$(SOLARVERSION)$/$(INPATH)$/lib$/libstlport_gcc.a
|
2007-12-12 06:21:33 -06:00
|
|
|
.ENDIF
|
2007-04-16 05:12:53 -05:00
|
|
|
.ENDIF # "$(USE_STLP_DEBUG" != ""
|
2006-03-08 07:13:02 -06:00
|
|
|
|
|
|
|
# ---------------------------------
|
|
|
|
# Link stage flags
|
|
|
|
# ---------------------------------
|
|
|
|
# always link with gcc since you may be linking c code and don't want -lstdc++ linked in!
|
|
|
|
|
|
|
|
## ericb 04 mars 2005
|
|
|
|
|
|
|
|
LINK*=$(CXX)
|
|
|
|
LINKC*=$(CC)
|
|
|
|
|
|
|
|
LINKFLAGSDEFS*=-Wl,-multiply_defined,suppress
|
2008-03-18 07:11:14 -05:00
|
|
|
# Very long install_names are needed so that install_name_tool -change later on
|
|
|
|
# does not complain that "larger updated load commands do not fit:"
|
|
|
|
LINKFLAGSRUNPATH_URELIB=-install_name '@__________________________________________________URELIB$/$(@:f)'
|
|
|
|
LINKFLAGSRUNPATH_UREBIN=
|
|
|
|
LINKFLAGSRUNPATH_OOO=-install_name '@__________________________________________________OOO$/$(@:f)'
|
|
|
|
LINKFLAGSRUNPATH_BRAND=
|
|
|
|
LINKFLAGSRUNPATH_OXT=
|
|
|
|
LINKFLAGS=$(LINKFLAGSDEFS)
|
2006-03-08 07:13:02 -06:00
|
|
|
|
|
|
|
# [ed] 5/14/02 If we're building for aqua, add in the objc runtime library into our link line
|
|
|
|
.IF "$(GUIBASE)" == "aqua"
|
|
|
|
LINKFLAGS+=-lobjc
|
|
|
|
# Sometimes we still use files that would be in a GUIBASE="unx" specific directory
|
|
|
|
# because they really aren't GUIBASE specific, so we've got to account for that here.
|
|
|
|
INCGUI+= -I$(PRJ)$/unx/inc
|
|
|
|
.ENDIF
|
|
|
|
|
2008-01-04 08:02:02 -06:00
|
|
|
#special settings form environment
|
|
|
|
LINKFLAGS+=$(EXTRA_LINKFLAGS)
|
|
|
|
|
2006-03-08 07:13:02 -06:00
|
|
|
# Random link flags dealing with different cases of linking
|
|
|
|
|
|
|
|
LINKFLAGSAPPGUI=-bind_at_load
|
2008-03-18 07:11:14 -05:00
|
|
|
LINKFLAGSSHLGUI=-dynamiclib -single_module
|
2006-03-08 07:13:02 -06:00
|
|
|
LINKFLAGSAPPCUI=-bind_at_load
|
2008-03-18 07:11:14 -05:00
|
|
|
LINKFLAGSSHLCUI=-dynamiclib -single_module
|
2006-03-08 07:13:02 -06:00
|
|
|
LINKFLAGSTACK=
|
|
|
|
LINKFLAGSPROF=
|
|
|
|
|
|
|
|
# Flag to add debugging information to final products
|
|
|
|
LINKFLAGSDEBUG=-g
|
|
|
|
LINKFLAGSOPT=
|
|
|
|
|
|
|
|
# ---------------------------------
|
|
|
|
# MacOS X shared library specifics
|
|
|
|
# ---------------------------------
|
|
|
|
|
|
|
|
# Tag to identify an output file as a library
|
|
|
|
DLLPRE=lib
|
|
|
|
# File extension to identify dynamic shared libraries on MacOS X
|
|
|
|
DLLPOST=.dylib
|
2007-05-10 09:11:43 -05:00
|
|
|
# Precompiled header file extension
|
|
|
|
PCHPOST=.gch
|
2006-03-08 07:13:02 -06:00
|
|
|
|
|
|
|
# We don't use mapping on MacOS X
|
2007-01-31 01:42:31 -06:00
|
|
|
#LINKVERSIONMAPFLAG=-Wl,--version-script
|
|
|
|
LINKVERSIONMAPFLAG=-Wl,-exported_symbols_list
|
2006-03-08 07:13:02 -06:00
|
|
|
|
|
|
|
SONAME_SWITCH=-Wl,-h
|
|
|
|
|
|
|
|
STDLIBCPP=-lstdc++
|
|
|
|
|
|
|
|
STDOBJVCL=$(L)$/salmain.o
|
|
|
|
STDOBJGUI=
|
|
|
|
STDSLOGUI=
|
|
|
|
STDOBJCUI=
|
|
|
|
STDSLOCUI=
|
|
|
|
|
2007-07-05 03:04:21 -05:00
|
|
|
.IF "$(GUIBASE)" == "aqua"
|
|
|
|
STDLIBCUIMT=CPPRUNTIME -lm
|
2007-10-09 09:05:16 -05:00
|
|
|
STDLIBGUIMT=-framework Carbon -framework Cocoa -lpthread CPPRUNTIME -lm
|
2007-08-03 07:55:43 -05:00
|
|
|
STDSHLCUIMT=-lpthread CPPRUNTIME -lm
|
2007-10-09 09:05:16 -05:00
|
|
|
STDSHLGUIMT=-framework Carbon -framework CoreFoundation -framework Cocoa -lpthread CPPRUNTIME -lm
|
2007-07-05 03:04:21 -05:00
|
|
|
PSPLIB=-lpsp
|
|
|
|
.ELSE
|
2007-08-03 07:55:43 -05:00
|
|
|
STDLIBCUIMT= CPPRUNTIME -lm
|
|
|
|
STDLIBGUIMT=-lX11 -lpthread CPPRUNTIME -lm
|
|
|
|
STDSHLCUIMT=-lpthread CPPRUNTIME -lm
|
2007-07-05 03:04:21 -05:00
|
|
|
STDSHLGUIMT=-lX11 -lXext -lpthread CPPRUNTIME -lm -framework CoreFoundation
|
|
|
|
.ENDIF
|
2006-03-08 07:13:02 -06:00
|
|
|
|
|
|
|
LIBMGR=ar
|
|
|
|
LIBFLAGS=-r
|
|
|
|
|
|
|
|
IMPLIB=
|
|
|
|
IMPLIBFLAGS=
|
|
|
|
|
|
|
|
MAPSYM=
|
|
|
|
MAPSYMFLAGS=
|
|
|
|
|
|
|
|
RC=irc
|
|
|
|
RCFLAGS=-fo$@ $(RCFILES)
|
|
|
|
RCLINK=
|
|
|
|
RCLINKFLAGS=
|
|
|
|
RCSETVERSION=
|