Author: hdu
Date: Thu Jan 2 15:45:55 2014
New Revision: 1554833
URL: http://svn.apache.org/r1554833
Log:
#i122301# add Makefiles for XCode>=4 on Mac
Added:
openoffice/trunk/main/solenv/inc/unxmacc.mk
openoffice/trunk/main/solenv/inc/unxmacci.mk
openoffice/trunk/main/solenv/inc/unxmaccx.mk
Modified:
openoffice/trunk/main/set_soenv.in
openoffice/trunk/main/solenv/inc/unx.mk
Modified: openoffice/trunk/main/set_soenv.in
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/set_soenv.in?rev=1554833&r1=1554832&r2=1554833&view=diff
==============================================================================
--- openoffice/trunk/main/set_soenv.in (original)
+++ openoffice/trunk/main/set_soenv.in Thu Jan 2 15:45:55 2014
@@ -753,29 +753,41 @@ elsif ( $platform =~ m/os2/ )
elsif ( $platform =~ m/darwin/ )
{ print "Setting Mac OS X/Darwin specific values... ";
$BIG_SVX = "TRUE";
- $COM = "GCC";
$COMPATH = '@COMPATH@';
- if ($platform =~ m/^i[3456]86/)
+ print "Darwin platform = " . $platform ." ";
+ if( $CC =~ "gcc" )
{
- print "Setting values for Mac OS X/Darwin on x86... ";
+ print "Setting values for MacOSX/Darwin for Xcode<=3";
+ $COM = "GCC";
$outfile = "MacOSXX86Env.Set";
$CPU = "I";
$CPUNAME = "INTEL";
$OUTPATH = "unxmacxi";
}
- elsif ($platform =~ m/^powerpc/)
+ elsif ($platform =~ m/^i[3456]86/)
{
- print "Setting values for Mac OS X/Darwin on PowerPC... ";
- $outfile = "MacOSXPPCEnv.Set";
- $CPU = "P";
- $CPUNAME = "POWERPC";
- $OUTPATH = "unxmacxp";
+ print "Setting values for MacOSX/Darwin on x86_32... ";
+ $COM = "CLANG";
+ $outfile = "MacOSXX32Env.Set";
+ $CPU = "I";
+ $CPUNAME = "INTEL";
+ $OUTPATH = "unxmacci";
}
- if (@GCCVER@ >= 30401) {
- $CVER = "C341";
- } else {
- $CVER = "C300";
+ elsif ($platform =~ m/^x86_64/)
+ {
+ print "Setting values for MacOSX/Darwin on x86_64... ";
+ $COM = "CLANG";
+ $outfile = "MacOSXX64Env.Set";
+ $CPU = "X";
+ $CPUNAME = "X86_64";
+ $OUTPATH = "unxmaccx";
+ }
+ else
+ {
+ print "\nset_soenv: Unknown MacOSX/Darwin platform: $platform\n";
+ exit 1;
}
+ $CVER = "DUMMY_CVER";
$GUI = "UNX";
$GVER = "VCL";
$INPATH = $OUTPATH.$PROEXT;
Modified: openoffice/trunk/main/solenv/inc/unx.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/unx.mk?rev=1554833&r1=1554832&r2=1554833&view=diff
==============================================================================
--- openoffice/trunk/main/solenv/inc/unx.mk (original)
+++ openoffice/trunk/main/solenv/inc/unx.mk Thu Jan 2 15:45:55 2014
@@ -151,6 +151,14 @@
.INCLUDE : unxmacxi.mk
.ENDIF
+.IF "$(COM)$(OS)$(CPU)" == "CLANGMACOSXI"
+.INCLUDE : unxmacci.mk
+.ENDIF
+
+.IF "$(COM)$(OS)$(CPU)" == "CLANGMACOSXX"
+.INCLUDE : unxmaccx.mk
+.ENDIF
+
.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXM"
.INCLUDE : unxlngmips.mk
.ENDIF
Added: openoffice/trunk/main/solenv/inc/unxmacc.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/unxmacc.mk?rev=1554833&view=auto
==============================================================================
--- openoffice/trunk/main/solenv/inc/unxmacc.mk (added)
+++ openoffice/trunk/main/solenv/inc/unxmacc.mk Thu Jan 2 15:45:55 2014
@@ -0,0 +1,263 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+
+
+##########################################################################
+# Platform MAKEFILE for Mac OS X and Darwin on both PowerPC and Intel
+##########################################################################
+
+# PROCESSOR_DEFINES and DLLPOSTFIX are defined in the particular platform file
+
+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.
+CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY
$(PROCESSOR_DEFINES) -D_USE_NAMESPACE=1
+
+# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build
result
+# (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
+# http://developer.apple.com/technotes/tn2002/tn2064.html
+# done in setsolar/configure now. left here for documentation
+#MACOSX_DEPLOYMENT_TARGET=10.7
+#.EXPORT: MACOSX_DEPLOYMENT_TARGET
+CDEFS+=-DQUARTZ
+EXTRA_CDEFS*=-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
+
+# 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
+
+# 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
+# objcpp = Objective C++ compiler to use
+CXX*=clang++
+CC*=clang
+objc*=$(CC)
+objcpp*=$(CXX)
+
+EXTRA_CFLAGS=
+
+CFLAGS=-fsigned-char -fmessage-length=0 -c $(EXTRA_CFLAGS)
+
+.IF "$(DISABLE_DEPRECATION_WARNING)" == "TRUE"
+CFLAGS+=-Wno-deprecated-declarations
+.ENDIF
+# ---------------------------------
+# Compilation flags
+# ---------------------------------
+# Normal C compilation flags
+CFLAGSCC=-pipe -fsigned-char
+
+# Normal Objective C compilation flags
+#OBJCFLAGS=-no-precomp
+OBJCFLAGS=-fobjc-exceptions
+# -x options generally ignored by ccache, tell it that it can cache
+# the result nevertheless
+CCACHE_SKIP:=$(eq,$(USE_CCACHE),YES --ccache-skip $(NULL))
+OBJCXXFLAGS:=$(CCACHE_SKIP) -x $(CCACHE_SKIP) objective-c++ -fobjc-exceptions
+
+# Comp Flags for files that need exceptions enabled (C and C++)
+CFLAGSEXCEPTIONS=-fexceptions
+
+# Comp Flags for files that do not need exceptions enabled (C and C++)
+CFLAGS_NO_EXCEPTIONS=-fno-exceptions
+
+# Normal C++ compilation flags
+CFLAGSCXX=-pipe -fsigned-char
+
+CFLAGSCXX+= -Wno-ctor-dtor-privacy
+
+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
+
+# 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
+
+# ---------------------------------
+# Optimization flags
+# ---------------------------------
+CFLAGSOPT=-O2 -fno-strict-aliasing
+CFLAGSNOOPT=-O0
+
+# -Wshadow does not work for C with nested uses of pthread_cleanup_push:
+# -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:
+CFLAGSWARNCC=-Wall -Wendif-labels
+CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor
+CFLAGSWALLCC=$(CFLAGSWARNCC)
+CFLAGSWALLCXX=$(CFLAGSWARNCXX)
+CFLAGSWERRCC=-Werror
+
+# 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
+
+#special settings from environment
+CDEFS+=$(EXTRA_CDEFS)
+
+# ---------------------------------
+# STL library names
+# ---------------------------------
+
+CDEFS+=-DHAVE_STL_INCLUDE_PATH -I../v1/
+STDLIBCPP=-lc++
+
+# ---------------------------------
+# Link stage flags
+# ---------------------------------
+
+LINK*=$(CXX)
+LINKC*=$(CC)
+
+###LINKFLAGSDEFS*=-Wl,-multiply_defined,suppress
+# assure backwards-compatibility
+###EXTRA_LINKFLAGS*=-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
+EXTRA_LINKFLAGS*=-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
+# 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_SDK=
+LINKFLAGSRUNPATH_BRAND=
+LINKFLAGSRUNPATH_OXT=
+LINKFLAGSRUNPATH_BOXT=
+LINKFLAGSRUNPATH_NONE=-install_name
'@__________________________________________________NONE/$(@:f)'
+LINKFLAGS=$(LINKFLAGSDEFS)
+
+# [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
+
+#special settings form environment
+LINKFLAGS+=$(EXTRA_LINKFLAGS)
+
+# Random link flags dealing with different cases of linking
+
+LINKFLAGSAPPGUI=-bind_at_load
+LINKFLAGSSHLGUI=-dynamiclib -single_module
+LINKFLAGSAPPCUI=-bind_at_load
+LINKFLAGSSHLCUI=-dynamiclib -single_module
+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
+# Precompiled header file extension
+PCHPOST=.gch
+
+#LINKVERSIONMAPFLAG=-Xlinker -map -Xlinker
+LINKVERSIONMAPFLAG=-Wl,-map -Wl,
+
+SONAME_SWITCH=-Wl,-h
+
+### STDLIBCPP=-stdlib=libc++
+STDLIBCPP=-lc++
+
+STDOBJVCL=$(L)/salmain.o
+STDOBJGUI=
+STDSLOGUI=
+STDOBJCUI=
+STDSLOCUI=
+
+.IF "$(GUIBASE)" == "aqua"
+ 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
+.ELSE
+ STDLIBCUIMT= CPPRUNTIME -lm
+ STDLIBGUIMT=-lX11 -lpthread CPPRUNTIME -lm
+ STDSHLCUIMT=-lpthread CPPRUNTIME -lm
+ STDSHLGUIMT=-lX11 -lXext -lpthread CPPRUNTIME -lm -framework
CoreFoundation
+.ENDIF
+
+LIBMGR=ar
+LIBFLAGS=-r
+
+IMPLIB=
+IMPLIBFLAGS=
+
+MAPSYM=
+MAPSYMFLAGS=
+
+RC=irc
+RCFLAGS=-fo$@ $(RCFILES)
+RCLINK=
+RCLINKFLAGS=
+RCSETVERSION=
+
+OOO_LIBRARY_PATH_VAR = DYLD_LIBRARY_PATH
Added: openoffice/trunk/main/solenv/inc/unxmacci.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/unxmacci.mk?rev=1554833&view=auto
==============================================================================
--- openoffice/trunk/main/solenv/inc/unxmacci.mk (added)
+++ openoffice/trunk/main/solenv/inc/unxmacci.mk Thu Jan 2 15:45:55 2014
@@ -0,0 +1,37 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+# Mac OSX specific defines
+
+PROCESSOR_DEFINES=-DX86
+
+DLLPOSTFIX=
+
+# flags to enable build with symbols; required by crashdump feature
+.IF "$(ENABLE_SYMBOLS)"=="SMALL"
+CFLAGSENABLESYMBOLS=-g1
+.ELSE
+CFLAGSENABLESYMBOLS=-g
+.ENDIF
+
+# Include generic Mac OS X makefile
+.INCLUDE : unxmacc.mk
+
Added: openoffice/trunk/main/solenv/inc/unxmaccx.mk
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/inc/unxmaccx.mk?rev=1554833&view=auto
==============================================================================
--- openoffice/trunk/main/solenv/inc/unxmaccx.mk (added)
+++ openoffice/trunk/main/solenv/inc/unxmaccx.mk Thu Jan 2 15:45:55 2014
@@ -0,0 +1,37 @@
+#**************************************************************
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#**************************************************************
+
+# Mac OSX specific defines
+
+PROCESSOR_DEFINES=-DX86_64
+
+DLLPOSTFIX=
+
+# flags to enable build with symbols; required by crashdump feature
+.IF "$(ENABLE_SYMBOLS)"=="SMALL"
+CFLAGSENABLESYMBOLS=-g1
+.ELSE
+CFLAGSENABLESYMBOLS=-g
+.ENDIF
+
+# Include generic Mac OS X makefile
+.INCLUDE : unxmacc.mk
+