diff options
author | konablend <[email protected]> | 2013-09-24 00:14:48 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2013-09-24 00:14:48 +0000 |
commit | c0d3a073e6309939a82b58d9aa693084b088644c (patch) | |
tree | c35b319b0a6cf293215a4e9ef9a24bfced92d17f /macosx | |
parent | 203b7a961fca0513ad09c1b9761faeac26d2edd0 (diff) |
BuildSystem: initial Xcode5 support
Tested on MacOSX 10.8.5 w/ Xcode 5.0, 4.6.3 and 4.5.2, various builds,
including terminal Xcode, terminal no Xcode and Xcode IDE,
and permutations with/without mp4v2 and mkv.
- push defs for optional static libraries (OSL) to respective modules
- adjust make-driven linking to use OSL
- adjust Xcode-driven linking to use OSL via ld -filelist option
- add Xcode project group for all OSL
- set Xcode project to use clang compiler
- add osx 10.8 xcconfig files
- add "supplemental" xcconfig file where EXTERNAL_CONFIGURE may be used
to specify configure-time options
- patch mp4v2 to compile with clang
Intructions for custom configure-options within Xcode IDE:
1. edit macosx/xcconfig/supplemental.xcconfig
2. save file (unsure how long it takes IDE to see change but it does)
3. build clean
4. build
5. never commit supplemental.xcconfig to repository - it is meant to
exist but not effect the build on a clean checkout, and to be used
only as a developer transient developer customization file.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5800 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HandBrake.xcodeproj/project.pbxproj | 34 | ||||
-rw-r--r-- | macosx/module.defs | 24 | ||||
-rw-r--r-- | macosx/module.rules | 8 | ||||
-rw-r--r-- | macosx/xcconfig/base/os.osx108.xcconfig | 2 | ||||
-rw-r--r-- | macosx/xcconfig/native.xcconfig | 1 | ||||
-rw-r--r-- | macosx/xcconfig/osx108.i386.xcconfig | 3 | ||||
-rw-r--r-- | macosx/xcconfig/osx108.x86_64.xcconfig | 3 | ||||
-rw-r--r-- | macosx/xcconfig/supplemental.xcconfig | 4 |
8 files changed, 57 insertions, 22 deletions
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj index a2dcbaccd..149933459 100644 --- a/macosx/HandBrake.xcodeproj/project.pbxproj +++ b/macosx/HandBrake.xcodeproj/project.pbxproj @@ -282,6 +282,13 @@ 277A3FD014AE84C500A835E4 /* osx106.i386.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = osx106.i386.xcconfig; sourceTree = "<group>"; }; 277A3FD114AE84C500A835E4 /* osx106.x86_64.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = osx106.x86_64.xcconfig; sourceTree = "<group>"; }; 277A3FD214AE84C500A835E4 /* osx107.x86_64.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = osx107.x86_64.xcconfig; sourceTree = "<group>"; }; + 277EFE8917ED4F5D001D4A6A /* osx108.i386.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = osx108.i386.xcconfig; sourceTree = "<group>"; }; + 277EFE8B17ED4F63001D4A6A /* osx108.x86_64.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = osx108.x86_64.xcconfig; sourceTree = "<group>"; }; + 277EFE8D17ED5628001D4A6A /* supplemental.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = supplemental.xcconfig; sourceTree = "<group>"; }; + 277EFE8F17ED7296001D4A6A /* libmp4v2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmp4v2.a; path = external/contrib/lib/libmp4v2.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 277EFE9017ED72A1001D4A6A /* libmkv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmkv.a; path = external/contrib/lib/libmkv.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 277EFE9117ED7749001D4A6A /* libfaac.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfaac.a; path = external/contrib/lib/libfaac.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 277EFE9217ED799E001D4A6A /* libfdk-aac.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libfdk-aac.a"; path = "../../../../Users/mike/Library/Developer/Xcode/DerivedData/HandBrake-anpxrfhxsejsxehiwuiaexjoygra/Build/Products/debug/external/contrib/lib/libfdk-aac.a"; sourceTree = "<group>"; }; 27D6C72414B1019100B785E4 /* libhb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libhb.a; path = external/libhb/libhb.a; sourceTree = BUILT_PRODUCTS_DIR; }; 27D6C72714B102DA00B785E4 /* liba52.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liba52.a; path = external/contrib/lib/liba52.a; sourceTree = BUILT_PRODUCTS_DIR; }; 27D6C72814B102DA00B785E4 /* libass.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libass.a; path = external/contrib/lib/libass.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -680,15 +687,30 @@ 277A3FD114AE84C500A835E4 /* osx106.x86_64.xcconfig */, 276941FA14B161B70027798C /* osx107.i386.xcconfig */, 277A3FD214AE84C500A835E4 /* osx107.x86_64.xcconfig */, + 277EFE8917ED4F5D001D4A6A /* osx108.i386.xcconfig */, + 277EFE8B17ED4F63001D4A6A /* osx108.x86_64.xcconfig */, + 277EFE8D17ED5628001D4A6A /* supplemental.xcconfig */, ); path = xcconfig; sourceTree = "<group>"; }; + 277EFE8E17ED71A2001D4A6A /* Static Libraries (optional) */ = { + isa = PBXGroup; + children = ( + 277EFE9117ED7749001D4A6A /* libfaac.a */, + 277EFE9217ED799E001D4A6A /* libfdk-aac.a */, + 277EFE9017ED72A1001D4A6A /* libmkv.a */, + 277EFE8F17ED7296001D4A6A /* libmp4v2.a */, + ); + name = "Static Libraries (optional)"; + sourceTree = "<group>"; + }; 27D6C72314B1013400B785E4 /* Products (external) */ = { isa = PBXGroup; children = ( 271BA4C914B1238E00BC1D2C /* Support */, 271BA4C714B1236D00BC1D2C /* Static Libraries */, + 277EFE8E17ED71A2001D4A6A /* Static Libraries (optional) */, ); name = "Products (external)"; sourceTree = "<group>"; @@ -983,11 +1005,15 @@ "DEBUG=1", "$(inherited)", ); - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_LDFLAGS = ( + "-filelist", + "$(EXTERNAL_BUILD)/macosx/osl.filelist.txt", + ); SHARED_PRECOMPS_DIR = "$(CONFIGURATION_TEMP_DIR)/PrecompiledHeaders"; STRIP_INSTALLED_PRODUCT = NO; }; @@ -1006,11 +1032,15 @@ EXTERNAL_SRC = ..; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvmgcc42; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_LDFLAGS = ( + "-filelist", + "$(EXTERNAL_BUILD)/macosx/osl.filelist.txt", + ); SHARED_PRECOMPS_DIR = "$(CONFIGURATION_TEMP_DIR)/PrecompiledHeaders"; STRIP_INSTALLED_PRODUCT = YES; }; diff --git a/macosx/module.defs b/macosx/module.defs index 39edaa405..e9cbc8636 100644 --- a/macosx/module.defs +++ b/macosx/module.defs @@ -7,10 +7,12 @@ MACOSX.build/ = $(BUILD/)macosx/ MACOSX.m4.in = $(wildcard $(MACOSX.src/)*.m4) MACOSX.m4.out = $(MACOSX.m4.in:$(MACOSX.src/)%.m4=$(MACOSX.build/)%) +MACOSX.osl.filelist = $(MACOSX.build/)osl.filelist.txt + ############################################################################### BUILD.out += $(MACOSX.m4.out) -BUILD.out += $(MACOSX.m4.wc.out) +BUILD.out += $(MACOSX.osl.filelist) ############################################################################### @@ -26,25 +28,8 @@ MACOSX.map.g.std = debug MACOSX.map.g.max = debug ifeq (1,$(FEATURE.opencl)) -MACOSX.extra_cflags = OTHER_CFLAGS='-DUSE_OPENCL' -endif - -ifeq (1,$(FEATURE.fdk_aac)) - extra_libs += $(abspath $(BUILD))/contrib/lib/libfdk-aac.a -endif - -ifeq (1,$(FEATURE.faac)) - extra_libs += $(abspath $(BUILD))/contrib/lib/libfaac.a -endif - -ifeq (1,$(FEATURE.mp4v2)) - extra_libs += $(abspath $(BUILD))/contrib/lib/libmp4v2.a -endif - -ifeq (1,$(FEATURE.libmkv)) - extra_libs += $(abspath $(BUILD))/contrib/lib/libmkv.a + MACOSX.extra_cflags = OTHER_CFLAGS='-DUSE_OPENCL' endif -MACOSX.extra_ldflags = OTHER_LDFLAGS='$(extra_libs)' ## xcconfig: must be one of macosx/xcconfig/*.xcconfig MACOSX.xcconfig = $(foreach x,$(XCODE.xcconfig),-xcconfig $(MACOSX.src/)xcconfig/$(x)) @@ -76,6 +61,5 @@ MACOSX.XCODE = $(strip \ EXTERNAL_VARS='$(-*-command-variables-*-)' \ \ $(MACOSX.extra_cflags) \ - $(MACOSX.extra_ldflags) \ \ $(2) ) diff --git a/macosx/module.rules b/macosx/module.rules index 6ee6c0019..a34b19166 100644 --- a/macosx/module.rules +++ b/macosx/module.rules @@ -1,15 +1,23 @@ $(eval $(call import.MODULE.rules,MACOSX)) macosx.build: $(MACOSX.m4.out) +macosx.build: $(MACOSX.osl.filelist) macosx.clean: $(RM.exe) -f $(MACOSX.m4.out) + $(RM.exe) -f $(MACOSX.osl.filelist) $(MACOSX.m4.out): $(BUILD/)project/handbrake.m4 $(MACOSX.m4.out): | $(dir $(MACOSX.m4.out)) $(MACOSX.m4.out): $(MACOSX.build/)%: $(MACOSX.src/)%.m4 $(M4.exe) -Iproject $< > $@ +$(MACOSX.osl.filelist): | $(dir $(MACOSX.osl.filelist)) +$(MACOSX.osl.filelist): $(BUILD/)GNUmakefile + @echo "creating $@" + @> $@ + $(foreach i,$(foreach m,$(MODULES.NAMES),$($m.OSL.files)),$(call fn.PRINTLN,@echo $i >> $@)) + ############################################################################### clean: macosx.clean diff --git a/macosx/xcconfig/base/os.osx108.xcconfig b/macosx/xcconfig/base/os.osx108.xcconfig new file mode 100644 index 000000000..6da71a91f --- /dev/null +++ b/macosx/xcconfig/base/os.osx108.xcconfig @@ -0,0 +1,2 @@ +SDKROOT = macosx10.8 +MACOSX_DEPLOYMENT_TARGET = 10.8 diff --git a/macosx/xcconfig/native.xcconfig b/macosx/xcconfig/native.xcconfig index d88c8c44f..c110fc712 100644 --- a/macosx/xcconfig/native.xcconfig +++ b/macosx/xcconfig/native.xcconfig @@ -1,2 +1,3 @@ #include "base/arch.native.xcconfig" EXTERNAL_XCCONFIG = native +#include "supplemental.xcconfig" diff --git a/macosx/xcconfig/osx108.i386.xcconfig b/macosx/xcconfig/osx108.i386.xcconfig new file mode 100644 index 000000000..d3dcc668c --- /dev/null +++ b/macosx/xcconfig/osx108.i386.xcconfig @@ -0,0 +1,3 @@ +#include "base/os.osx108.xcconfig" +#include "base/arch.i386.xcconfig" +EXTERNAL_XCCONFIG = osx108.i386 diff --git a/macosx/xcconfig/osx108.x86_64.xcconfig b/macosx/xcconfig/osx108.x86_64.xcconfig new file mode 100644 index 000000000..4e602e8ab --- /dev/null +++ b/macosx/xcconfig/osx108.x86_64.xcconfig @@ -0,0 +1,3 @@ +#include "base/os.osx108.xcconfig" +#include "base/arch.x86_64.xcconfig" +EXTERNAL_XCCONFIG = osx108.x86_64 diff --git a/macosx/xcconfig/supplemental.xcconfig b/macosx/xcconfig/supplemental.xcconfig new file mode 100644 index 000000000..a92536f8d --- /dev/null +++ b/macosx/xcconfig/supplemental.xcconfig @@ -0,0 +1,4 @@ +// ## THIS FILE IS INTENDED FOR LOCAL WORKSPACE ONLY. +// ## THIS FILE SHOULD NEVER BE COMMITTED TO REPOSITORY WITH UNCOMMENTED LINES. + +// EXTERNAL_CONFIGURE = --disable-mp4v2 --disable-mkv |