From 2a5219567634ab7ab74314ff3615132becadff4a Mon Sep 17 00:00:00 2001 From: thomasvl Date: Mon, 28 Jan 2008 20:19:42 +0000 Subject: initial drop of a few sources to start things out --- XcodeConfig/DebugTigerOrLater.xcconfig | 34 ++++++++++++++++ XcodeConfig/DebugUnittest.xcconfig | 29 ++++++++++++++ XcodeConfig/LoadableBundle.xcconfig | 30 ++++++++++++++ XcodeConfig/ReleaseTigerOrLater.xcconfig | 33 ++++++++++++++++ XcodeConfig/ReleaseUnittest.xcconfig | 37 +++++++++++++++++ XcodeConfig/SharedLibrary.xcconfig | 29 ++++++++++++++ XcodeConfig/StaticLibrary.xcconfig | 30 ++++++++++++++ XcodeConfig/subconfig/CodeCoverage.xcconfig | 25 ++++++++++++ XcodeConfig/subconfig/CodeCoverageStatic.xcconfig | 24 ++++++++++++ XcodeConfig/subconfig/Debug.xcconfig | 40 +++++++++++++++++++ XcodeConfig/subconfig/General.xcconfig | 48 +++++++++++++++++++++++ XcodeConfig/subconfig/Release.xcconfig | 38 ++++++++++++++++++ XcodeConfig/subconfig/TigerOrLater.xcconfig | 29 ++++++++++++++ XcodeConfig/subconfig/Unittest.xcconfig | 37 +++++++++++++++++ 14 files changed, 463 insertions(+) create mode 100644 XcodeConfig/DebugTigerOrLater.xcconfig create mode 100644 XcodeConfig/DebugUnittest.xcconfig create mode 100644 XcodeConfig/LoadableBundle.xcconfig create mode 100644 XcodeConfig/ReleaseTigerOrLater.xcconfig create mode 100644 XcodeConfig/ReleaseUnittest.xcconfig create mode 100644 XcodeConfig/SharedLibrary.xcconfig create mode 100644 XcodeConfig/StaticLibrary.xcconfig create mode 100644 XcodeConfig/subconfig/CodeCoverage.xcconfig create mode 100644 XcodeConfig/subconfig/CodeCoverageStatic.xcconfig create mode 100644 XcodeConfig/subconfig/Debug.xcconfig create mode 100644 XcodeConfig/subconfig/General.xcconfig create mode 100644 XcodeConfig/subconfig/Release.xcconfig create mode 100644 XcodeConfig/subconfig/TigerOrLater.xcconfig create mode 100644 XcodeConfig/subconfig/Unittest.xcconfig (limited to 'XcodeConfig') diff --git a/XcodeConfig/DebugTigerOrLater.xcconfig b/XcodeConfig/DebugTigerOrLater.xcconfig new file mode 100644 index 0000000..7a78a13 --- /dev/null +++ b/XcodeConfig/DebugTigerOrLater.xcconfig @@ -0,0 +1,34 @@ +// +// DebugTigerOrLater.xcconfig +// +// Xcode configuration file for building a Debug target on Tiger or later. +// +// This is a _Configuration_ Xcode config file for use in the "Based on" popup +// of the project configuration editor. Do _not_ use this as the config base +// and individual Xcode target, there are other configuration files for that +// purpose. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Pull in our general Google settings +#include "subconfig/General.xcconfig" + +// Tiger or later +#include "subconfig/TigerOrLater.xcconfig" + +// Debug settings +#include "subconfig/Debug.xcconfig" + diff --git a/XcodeConfig/DebugUnittest.xcconfig b/XcodeConfig/DebugUnittest.xcconfig new file mode 100644 index 0000000..c32c63d --- /dev/null +++ b/XcodeConfig/DebugUnittest.xcconfig @@ -0,0 +1,29 @@ +// +// DebugUnittest.xcconfig +// +// Xcode configuration file for a debug unittest target. +// +// This is a _Target_ config file, for use in the "Based on" popup of the +// settings dialog for a target. Do not attempt to apply this as the base +// of an Xcode configuration in the project settings dialog. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Unittests are loadable bundles +#include "subconfig/Unittest.xcconfig" + +// See comments in ReleaseUnittest.xcconfig regarding BUNDLE_LOADER and +// how it should be set if you are running into link errors. \ No newline at end of file diff --git a/XcodeConfig/LoadableBundle.xcconfig b/XcodeConfig/LoadableBundle.xcconfig new file mode 100644 index 0000000..78ed39a --- /dev/null +++ b/XcodeConfig/LoadableBundle.xcconfig @@ -0,0 +1,30 @@ +// +// LoadableBundle.xcconfig +// +// Xcode configuration file for a loadable bundle. Usually a Cocoa plugin or +// similar. +// +// This is a _Target_ config file, for use in the "Based on" popup of the +// settings dialog for a target. Do not attempt to apply this as the base +// of an Xcode configuration in the project settings dialog. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Bundles should not have their external symbols stripped. +STRIP_STYLE = non-global + +// Bundles need to be position independent +GCC_DYNAMIC_NO_PIC = NO diff --git a/XcodeConfig/ReleaseTigerOrLater.xcconfig b/XcodeConfig/ReleaseTigerOrLater.xcconfig new file mode 100644 index 0000000..ee30238 --- /dev/null +++ b/XcodeConfig/ReleaseTigerOrLater.xcconfig @@ -0,0 +1,33 @@ +// +// ReleaseTigerOrLater.xcconfig +// +// Xcode configuration file for building a Release target on Tiger or later. +// +// This is a _Configuration_ Xcode config file for use in the "Based on" popup +// of the project configuration editor. Do _not_ use this as the config base +// and individual Xcode target, there are other configuration files for that +// purpose. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Pull in our general Google settings +#include "subconfig/General.xcconfig" + +// Tiger or later +#include "subconfig/TigerOrLater.xcconfig" + +// Release settings +#include "subconfig/Release.xcconfig" diff --git a/XcodeConfig/ReleaseUnittest.xcconfig b/XcodeConfig/ReleaseUnittest.xcconfig new file mode 100644 index 0000000..9ec14de --- /dev/null +++ b/XcodeConfig/ReleaseUnittest.xcconfig @@ -0,0 +1,37 @@ +// +// ReleaseUnittest.xcconfig +// +// Xcode configuration file for a release unittest target. +// +// This is a _Target_ config file, for use in the "Based on" popup of the +// settings dialog for a target. Do not attempt to apply this as the base +// of an Xcode configuration in the project settings dialog. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Unittests are loadable bundles +#include "subconfig/Unittest.xcconfig" + +// When running OCUnit tests in Release mode the unittests BUNDLE_LOADER +// is probably stripped (or at least it will be if they are using our +// config files). In that case the Unittest will fail to link because +// the symbols have been removed from the bundle's loader's symbol table. +// This flag tells the unittest to trust that the values will be available +// at runtime (or error out) and not to force an error at link time. +// Do NOT set BUNDLE_LOADER (Bundle Loader) setting in a release unittest target +// because you will run into interesting link issues +// "indirect symbol table entry n past the end of the symbol table" +OTHER_LDFLAGS = $(OTHER_LDFLAGS) -undefined dynamic_lookup diff --git a/XcodeConfig/SharedLibrary.xcconfig b/XcodeConfig/SharedLibrary.xcconfig new file mode 100644 index 0000000..7593392 --- /dev/null +++ b/XcodeConfig/SharedLibrary.xcconfig @@ -0,0 +1,29 @@ +// +// SharedLibrary.xcconfig +// +// Xcode configuration file for a shared library. +// +// This is a _Target_ config file, for use in the "Based on" popup of the +// settings dialog for a target. Do not attempt to apply this as the base +// of an Xcode configuration in the project settings dialog. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Dynamic libs need to be position independent +GCC_DYNAMIC_NO_PIC = NO + +// Dynamic libs should not have their external symbols stripped. +STRIP_STYLE = non-global \ No newline at end of file diff --git a/XcodeConfig/StaticLibrary.xcconfig b/XcodeConfig/StaticLibrary.xcconfig new file mode 100644 index 0000000..f459e83 --- /dev/null +++ b/XcodeConfig/StaticLibrary.xcconfig @@ -0,0 +1,30 @@ +// +// StaticLibrary.xcconfig +// +// Xcode configuration file for a static library. +// +// This is a _Target_ config file, for use in the "Based on" popup of the +// settings dialog for a target. Do not attempt to apply this as the base +// of an Xcode configuration in the project settings dialog. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Static libs can be included in bundles so make them position independent +GCC_DYNAMIC_NO_PIC = NO + +// Static libs should not have their internal globals or external symbols +// stripped. +STRIP_STYLE = debugging diff --git a/XcodeConfig/subconfig/CodeCoverage.xcconfig b/XcodeConfig/subconfig/CodeCoverage.xcconfig new file mode 100644 index 0000000..438d5c6 --- /dev/null +++ b/XcodeConfig/subconfig/CodeCoverage.xcconfig @@ -0,0 +1,25 @@ +// +// CodeCoverage.xcconfig +// +// Xcode configuration file for building executables that need code coverage. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Static Code Coverage +#include "CodeCoverageStatic.xcconfig" + +// Need gcov library +OTHER_LDFLAGS = ${OTHER_LDFLAGS} -lgcov diff --git a/XcodeConfig/subconfig/CodeCoverageStatic.xcconfig b/XcodeConfig/subconfig/CodeCoverageStatic.xcconfig new file mode 100644 index 0000000..f6cca92 --- /dev/null +++ b/XcodeConfig/subconfig/CodeCoverageStatic.xcconfig @@ -0,0 +1,24 @@ +// +// CodeCoverageStatic.xcconfig +// +// Xcode configuration file for building static libs that need code coverage. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + + +// For measuring code coverage +GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES +GCC_GENERATE_TEST_COVERAGE_FILES = YES diff --git a/XcodeConfig/subconfig/Debug.xcconfig b/XcodeConfig/subconfig/Debug.xcconfig new file mode 100644 index 0000000..482d451 --- /dev/null +++ b/XcodeConfig/subconfig/Debug.xcconfig @@ -0,0 +1,40 @@ +// +// Debug.xcconfig +// +// General Xcode configuration file for Debug targets. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// No optimization +GCC_OPTIMIZATION_LEVEL = 0 + +// Deployment postprocessing is what triggers Xcode to strip, turn it off +DEPLOYMENT_POSTPROCESSING = NO + +// Dead code stripping off +DEAD_CODE_STRIPPING = NO + +// Debug symbols should be on obviously +GCC_GENERATE_DEBUGGING_SYMBOLS = YES + +// Define the DEBUG macro in all debug builds +OTHER_CFLAGS = $(OTHER_CFLAGS) -DDEBUG=1 + +// Turns on special C++ STL checks to "encourage" good STL use +GCC_PREPROCESSOR_DEFINITIONS = $(GCC_PREPROCESSOR_DEFINITIONS) _GLIBCXX_DEBUG_PEDANTIC _GLIBCXX_DEBUG _GLIBCPP_CONCEPT_CHECKS + +// Sets Debug info to DWARF +DEBUG_INFORMATION_FORMAT = dwarf diff --git a/XcodeConfig/subconfig/General.xcconfig b/XcodeConfig/subconfig/General.xcconfig new file mode 100644 index 0000000..b9f7313 --- /dev/null +++ b/XcodeConfig/subconfig/General.xcconfig @@ -0,0 +1,48 @@ +// +// General.xcconfig +// +// Xcode configuration file for general build settings applicable to all +// Google projects and targets. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Build for PPC and Intel +ARCHS = ppc i386 + +// Zerolink prevents link warnings so turn it off +ZERO_LINK = NO + +// Prebinding considered unhelpful in 10.3 and later +PREBINDING = NO + +// Strictest warning policy +WARNING_CFLAGS = -Wall -Werror -Wendif-labels -Wnewline-eof + +// Work around Xcode bugs by using external strip. See: +// http://lists.apple.com/archives/Xcode-users/2006/Feb/msg00050.html +SEPARATE_STRIP = YES + +// Force C99 dialect +GCC_C_LANGUAGE_STANDARD = c99 + +// Obj-C exceptions are needed for @synchronized(self) +GCC_ENABLE_OBJC_EXCEPTIONS = YES + +// not sure why apple defaults this on, but it's pretty risky +ALWAYS_SEARCH_USER_PATHS = NO + +// Turn on position dependent code for most cases (overridden where appropriate) +GCC_DYNAMIC_NO_PIC = YES diff --git a/XcodeConfig/subconfig/Release.xcconfig b/XcodeConfig/subconfig/Release.xcconfig new file mode 100644 index 0000000..74df258 --- /dev/null +++ b/XcodeConfig/subconfig/Release.xcconfig @@ -0,0 +1,38 @@ +// +// Release.xcconfig +// +// General Xcode configuration file for Release targets. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Optimize for space and size (Apple recommendation) +GCC_OPTIMIZATION_LEVEL = s + +// Deploment postprocessing is what triggers Xcode to strip +DEPLOYMENT_POSTPROCESSING = YES + +// No symbols +GCC_GENERATE_DEBUGGING_SYMBOLS = NO + +// Dead code strip does not affect ObjC code but can help for C +DEAD_CODE_STRIPPING = YES + +// NDEBUG is used by things like assert.h, so define it for general compat. +// ASSERT going away in release tends to create unused vars. +OTHER_CFLAGS = $(OTHER_CFLAGS) -DNDEBUG=1 -Wno-unused-variable + +// When we strip we want to strip all symbols in release, but save externals. +STRIP_STYLE = all diff --git a/XcodeConfig/subconfig/TigerOrLater.xcconfig b/XcodeConfig/subconfig/TigerOrLater.xcconfig new file mode 100644 index 0000000..d46e1a2 --- /dev/null +++ b/XcodeConfig/subconfig/TigerOrLater.xcconfig @@ -0,0 +1,29 @@ +// +// TigerOrLater.xcconfig +// +// Xcode configuration file for Google applications targeting 10.4 Tiger or +// later. These settings produce a Universal binary compatible with 10.4 for +// PPC and Intel. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Default SDK and minimum OS version is 10.4 +SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk +MACOSX_DEPLOYMENT_TARGET = 10.4 +GCC_VERSION = 4.0 + +// On Tiger use Obj-C fast dispatch +GCC_FAST_OBJC_DISPATCH = YES diff --git a/XcodeConfig/subconfig/Unittest.xcconfig b/XcodeConfig/subconfig/Unittest.xcconfig new file mode 100644 index 0000000..d3bdee8 --- /dev/null +++ b/XcodeConfig/subconfig/Unittest.xcconfig @@ -0,0 +1,37 @@ +// +// Unittest.xcconfig +// +// Xcode configuration file for a unittest target. +// +// This is a _Target_ config file, for use in the "Based on" popup of the +// settings dialog for a target. Do not attempt to apply this as the base +// of an Xcode configuration in the project settings dialog. +// +// Copyright 2006-2008 Google Inc. +// +// Licensed 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. +// + +// Unittests are loadable bundles +#include "../LoadableBundle.xcconfig" + +// No prefix +GCC_PRECOMPILE_PREFIX_HEADER = NO +GCC_PREFIX_HEADER = + +// Force C99 dialect with GNU extensions (needed for OCUnit) +GCC_C_LANGUAGE_STANDARD = gnu99 + +// Deploment postprocessing is what triggers Xcode to strip, we don't strip +// unittests +DEPLOYMENT_POSTPROCESSING = NO -- cgit v1.2.3