Index: Makefile |
diff --git a/Makefile b/Makefile |
index a7b27317a3ad37d026b5f611ed55cc7dadcc4880..ab4fe646875a077e67db8cf0aa108977c46e9055 100644 |
--- a/Makefile |
+++ b/Makefile |
@@ -78,6 +78,7 @@ endif |
# - any arch listed in ARCHES (see below) |
# - any mode listed in MODES |
# - every combination <arch>.<mode>, e.g. "ia32.release" |
+# - "native": current host's architecture, release mode |
# - any of the above with .check appended, e.g. "ia32.release.check" |
# - default (no target specified): build all ARCHES and MODES |
# - "check": build all targets and run all tests |
@@ -103,7 +104,7 @@ CHECKS = $(addsuffix .check,$(BUILDS)) |
# File where previously used GYPFLAGS are stored. |
ENVFILE = $(OUTDIR)/environment |
-.PHONY: all check clean dependencies $(ENVFILE).new \ |
+.PHONY: all check clean dependencies $(ENVFILE).new native \ |
$(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ |
$(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) |
@@ -124,6 +125,11 @@ $(BUILDS): $(OUTDIR)/Makefile-$$(basename $$@) |
python -c "print raw_input().capitalize()") \ |
builddir="$(shell pwd)/$(OUTDIR)/$@" |
+native: $(OUTDIR)/Makefile-native |
+ @$(MAKE) -C "$(OUTDIR)" -f Makefile-native \ |
+ CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \ |
+ builddir="$(shell pwd)/$(OUTDIR)/$@" |
+ |
# Test targets. |
check: all |
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) |
@@ -140,6 +146,10 @@ $(CHECKS): $$(basename $$@) |
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \ |
--arch-and-mode=$(basename $@) |
+native.check: native |
+ @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR)/native \ |
+ --arch-and-mode=. |
+ |
# Clean targets. You can clean each architecture individually, or everything. |
$(addsuffix .clean,$(ARCHES)): |
rm -f $(OUTDIR)/Makefile-$(basename $@) |
@@ -147,7 +157,12 @@ $(addsuffix .clean,$(ARCHES)): |
rm -rf $(OUTDIR)/$(basename $@).debug |
find $(OUTDIR) -regex '.*\(host\|target\)-$(basename $@)\.mk' -delete |
-clean: $(addsuffix .clean,$(ARCHES)) |
+native.clean: |
+ rm -f $(OUTDIR)/Makefile-native |
+ rm -rf $(OUTDIR)/native |
+ find $(OUTDIR) -regex '.*\(host\|target\)-native\.mk' -delete |
+ |
+clean: $(addsuffix .clean,$(ARCHES)) native.clean |
# GYP file generation targets. |
$(OUTDIR)/Makefile-ia32: $(GYPFILES) $(ENVFILE) |
@@ -165,6 +180,10 @@ $(OUTDIR)/Makefile-arm: $(GYPFILES) $(ENVFILE) |
-Ibuild/standalone.gypi --depth=. -Ibuild/armu.gypi \ |
-S-arm $(GYPFLAGS) |
+$(OUTDIR)/Makefile-native: $(GYPFILES) $(ENVFILE) |
+ build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ |
+ -Ibuild/standalone.gypi --depth=. -S-native $(GYPFLAGS) |
+ |
# Replaces the old with the new environment file if they're different, which |
# will trigger GYP to regenerate Makefiles. |
$(ENVFILE): $(ENVFILE).new |