Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: Makefile

Issue 10257030: Added cross-build option in Makefile wrapper for gyp. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile
diff --git a/Makefile b/Makefile
index fb672e5fe783fa7da98e2f9b2d49e9f851068dfe..62525b1b024dfd4bcdf2238c4c1d3a55cab794eb 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@ OUTDIR ?= out
TESTJOBS ?= -j16
GYPFLAGS ?=
TESTFLAGS ?=
+BUILDTYPE ?= Release
ANDROID_NDK_ROOT ?=
ANDROID_TOOL_PREFIX = $(ANDROID_NDK_ROOT)/toolchain/bin/arm-linux-androideabi
@@ -153,7 +154,11 @@ $(BUILDS): $(OUTDIR)/Makefile-$$(basename $$@)
native: $(OUTDIR)/Makefile-native
@$(MAKE) -C "$(OUTDIR)" -f Makefile-native \
- CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \
+ CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=$(BUILDTYPE) \
+ builddir="$(shell pwd)/$(OUTDIR)/$@"
+
+cross: $(OUTDIR)/Makefile-cross
+ @$(MAKE) -C "$(OUTDIR)" -f Makefile-cross BUILDTYPE=$(BUILDTYPE) \
builddir="$(shell pwd)/$(OUTDIR)/$@"
# TODO(jkummerow): add "android.debug" when we need it.
@@ -207,7 +212,12 @@ android.clean:
rm -rf $(OUTDIR)/android.release
find $(OUTDIR) -regex '.*\(host\|target\)-android\.mk' -delete
-clean: $(addsuffix .clean,$(ARCHES)) native.clean
+cross.clean:
+ rm -f $(OUTDIR)/Makefile-cross
+ rm -rf $(OUTDIR)/cross
+ find $(OUTDIR) -regex '.*\(host\|target\)-cross\.mk' -delete
+
+clean: $(addsuffix .clean,$(ARCHES)) native.clean cross.clean
# GYP file generation targets.
$(OUTDIR)/Makefile-ia32: $(GYPFILES) $(ENVFILE)
@@ -239,6 +249,11 @@ $(OUTDIR)/Makefile-native: $(GYPFILES) $(ENVFILE)
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -S-native $(GYPFLAGS)
+$(OUTDIR)/Makefile-cross: $(GYPFILES) $(ENVFILE)
+ build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
+ -Ibuild/standalone.gypi --depth=. \
+ -Dtarget_arch=$(target) -S-cross $(GYPFLAGS)
+
$(OUTDIR)/Makefile-android: $(GYPFILES) $(ENVFILE) build/android.gypi \
must-set-ANDROID_NDK_ROOT
GYP_GENERATORS=make \
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698