From b52cf3dd95b3d3e7445ac9b82560317c296daa42 Mon Sep 17 00:00:00 2001 From: "borenet@google.com" Date: Tue, 5 Jun 2012 17:57:48 +0000 Subject: [PATCH] Support Mac-Android Cross-Compilation - Rename Android sampleApp target to SampleAppAndroid to avoid name collision - Detect skia_os on Darwin to differentiate between xcode and make builds Review URL: https://codereview.appspot.com/6303044 git-svn-id: http://skia.googlecode.com/svn/trunk@4168 2bbb7eff-a529-9590-31e7-b0007b416f81 --- Makefile | 13 ++++++++----- gyp/SampleApp.gyp | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a3ac806a17..f206ccf7d8 100644 --- a/Makefile +++ b/Makefile @@ -86,12 +86,15 @@ out/Makefile: # For the Mac, we create a convenience symlink to the generated binary. .PHONY: $(ALL_TARGETS) $(ALL_TARGETS):: gyp_if_needed -ifneq (,$(findstring Linux, $(uname))) +ifneq (,$(findstring skia_os=android, $(GYP_DEFINES))) $(MAKE) -C out $@ BUILDTYPE=$(BUILDTYPE) -endif -ifneq (,$(findstring Darwin, $(uname))) +else ifneq (,$(findstring Linux, $(uname))) + $(MAKE) -C out $@ BUILDTYPE=$(BUILDTYPE) +else ifneq (,$(findstring Darwin, $(uname))) rm -f out/$(BUILDTYPE) || if test -d out/$(BUILDTYPE); then echo "run 'make clean' or otherwise delete out/$(BUILDTYPE)"; exit 1; fi xcodebuild -project out/gyp/$@.xcodeproj -configuration $(BUILDTYPE) ln -s $(CWD)/xcodebuild/$(BUILDTYPE) out/$(BUILDTYPE) -endif - +else + echo "unknown platform $(uname)" + exit 1 +endif \ No newline at end of file diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp index c426508ebc..fd41f00773 100644 --- a/gyp/SampleApp.gyp +++ b/gyp/SampleApp.gyp @@ -252,7 +252,7 @@ 'experimental.gyp:experimental', ], 'dependencies': [ - 'android_system.gyp:sampleApp', + 'android_system.gyp:SampleAppAndroid', ], }], ],