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.
|
|
|
|
#
|
2010-02-12 08:01:35 -06:00
|
|
|
# Copyright 2000, 2010 Oracle and/or its affiliates.
|
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
|
|
|
# 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
|
|
|
|
##########################################################################
|
|
|
|
|
2011-06-01 01:40:48 -05:00
|
|
|
# PROCESSOR_DEFINES is defined in the particular platform file
|
2006-03-08 07:13:02 -06:00
|
|
|
|
|
|
|
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.
|
2011-02-09 03:49:18 -06:00
|
|
|
CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY $(PROCESSOR_DEFINES) -D_USE_NAMESPACE=1
|
2009-09-16 09:49:32 -05:00
|
|
|
# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build,
|
|
|
|
# build can assume functions/libraries of that version to be available
|
|
|
|
# unless you want to do runtime checks for 10.5 api, you also want to use the 10.4 sdk
|
|
|
|
# (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
|
|
|
|
# http://developer.apple.com/technotes/tn2002/tn2064.html
|
2011-01-06 05:31:18 -06:00
|
|
|
# done in setsolar/configure now. left here for documentation
|
|
|
|
#MACOSX_DEPLOYMENT_TARGET=10.4
|
|
|
|
#.EXPORT: MACOSX_DEPLOYMENT_TARGET
|
2011-07-26 18:56:37 -05:00
|
|
|
CDEFS+:=-DQUARTZ
|
2011-07-25 20:50:59 -05:00
|
|
|
|
2011-07-26 18:56:37 -05:00
|
|
|
EXTRA_CDEFS+:=-isysroot $(MACOSX_SDK_PATH) -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MAC_OS_X_VERSION_MIN_REQUIRED) -DMAC_OS_X_VERSION_MAX_ALLOWED=$(MAC_OS_X_VERSION_MAX_ALLOWED)
|
2006-03-08 07:13:02 -06:00
|
|
|
|
|
|
|
# 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
|
2010-01-27 06:08:32 -06:00
|
|
|
objc*=$(CC)
|
|
|
|
objcpp*=$(CXX)
|
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
|
2011-08-07 20:09:24 -05:00
|
|
|
|
2011-08-07 20:32:07 -05:00
|
|
|
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
|
2011-07-26 22:33:26 -05:00
|
|
|
CFLAGSCXX=-pipe -malign-natural -fsigned-char $(ARCH_FLAGS) -Wno-ctor-dtor-privacy
|
2011-07-26 21:58:08 -05:00
|
|
|
.IF "$(HAVE_GCC_NO_LONG-DOUBLE)" == "TRUE"
|
|
|
|
CFLAGSCXX+= -Wno-long-double
|
|
|
|
.ENDIF
|
2011-09-30 08:36:14 -05:00
|
|
|
.IF "$(HAVE_THREADSAFE_STATICS)" != "TRUE"
|
|
|
|
CFLAGSCXX += -fno-threadsafe-statics
|
|
|
|
.ENDIF
|
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
|
2009-09-07 08:35:07 -05:00
|
|
|
CFLAGS_USE_PCH=-I$(SLO)/pch -DPRECOMPILED_HEADERS -Winvalid-pch
|
|
|
|
CFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch
|
2007-05-10 09:11:43 -05:00
|
|
|
|
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)
|
2011-09-28 09:28:40 -05:00
|
|
|
CFLAGSWERRCC=-Werror -DLIBO_WERROR
|
2006-10-24 07:26:19 -05:00
|
|
|
|
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++
|
|
|
|
|
|
|
|
# ---------------------------------
|
|
|
|
# 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
|
2009-09-16 09:49:32 -05:00
|
|
|
# assure backwards-compatibility
|
2011-07-25 20:50:59 -05:00
|
|
|
EXTRA_LINKFLAGS*:=-Wl,-syslibroot,$(MACOSX_SDK_PATH)
|
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:"
|
2009-09-07 08:35:07 -05:00
|
|
|
LINKFLAGSRUNPATH_URELIB=-install_name '@__________________________________________________URELIB/$(@:f)'
|
2008-03-18 07:11:14 -05:00
|
|
|
LINKFLAGSRUNPATH_UREBIN=
|
2009-09-07 08:35:07 -05:00
|
|
|
LINKFLAGSRUNPATH_OOO=-install_name '@__________________________________________________OOO/$(@:f)'
|
2008-07-11 08:45:24 -05:00
|
|
|
LINKFLAGSRUNPATH_SDK=
|
2008-03-18 07:11:14 -05:00
|
|
|
LINKFLAGSRUNPATH_OXT=
|
2010-02-19 04:03:30 -06:00
|
|
|
LINKFLAGSRUNPATH_NONE=-install_name '@__________________________________________________NONE/$(@:f)'
|
2008-03-18 07:11:14 -05:00
|
|
|
LINKFLAGS=$(LINKFLAGSDEFS)
|
2006-03-08 07:13:02 -06:00
|
|
|
|
2011-08-01 04:40:33 -05:00
|
|
|
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
|
2006-03-08 07:13:02 -06:00
|
|
|
|
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++
|
|
|
|
|
|
|
|
STDOBJGUI=
|
|
|
|
STDSLOGUI=
|
|
|
|
STDOBJCUI=
|
|
|
|
STDSLOCUI=
|
|
|
|
|
2011-08-01 04:40:33 -05:00
|
|
|
STDLIBCUIMT=CPPRUNTIME -lm
|
|
|
|
STDLIBGUIMT=-framework Carbon -framework Cocoa -lpthread CPPRUNTIME -lm
|
|
|
|
STDSHLCUIMT=-lpthread CPPRUNTIME -lm
|
|
|
|
STDSHLGUIMT=-framework Carbon -framework CoreFoundation -framework Cocoa -lpthread CPPRUNTIME -lm
|
2006-03-08 07:13:02 -06:00
|
|
|
|
|
|
|
LIBMGR=ar
|
|
|
|
LIBFLAGS=-r
|
|
|
|
|
|
|
|
IMPLIB=
|
|
|
|
IMPLIBFLAGS=
|
|
|
|
|
|
|
|
MAPSYM=
|
|
|
|
MAPSYMFLAGS=
|
|
|
|
|
|
|
|
RC=irc
|
|
|
|
RCFLAGS=-fo$@ $(RCFILES)
|
|
|
|
RCLINK=
|
|
|
|
RCLINKFLAGS=
|
|
|
|
RCSETVERSION=
|
2009-02-19 05:42:47 -06:00
|
|
|
|
2009-12-18 09:01:47 -06:00
|
|
|
OOO_LIBRARY_PATH_VAR = DYLD_LIBRARY_PATH
|