Add MIPS support to top-level Makefile

For now, MIPS targets are not included in the "all", "release", "debug" and corresponding ".check" convenience targets, but they can be built explicitly (e.g. "mips.release.check").

Review URL: http://codereview.chromium.org/8510014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9943 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent cefa4cc1
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
# Variable default definitions. Override them by exporting them in your shell. # Variable default definitions. Override them by exporting them in your shell.
CXX ?= "g++" # For distcc: export CXX="distcc g++" CXX ?= g++
LINK ?= "g++" LINK ?= g++
OUTDIR ?= out OUTDIR ?= out
TESTJOBS ?= -j16 TESTJOBS ?= -j16
GYPFLAGS ?= GYPFLAGS ?=
...@@ -93,7 +93,7 @@ endif ...@@ -93,7 +93,7 @@ endif
# - every combination <arch>.<mode>, e.g. "ia32.release" # - every combination <arch>.<mode>, e.g. "ia32.release"
# - "native": current host's architecture, release mode # - "native": current host's architecture, release mode
# - any of the above with .check appended, e.g. "ia32.release.check" # - any of the above with .check appended, e.g. "ia32.release.check"
# - default (no target specified): build all ARCHES and MODES # - default (no target specified): build all DEFAULT_ARCHES and MODES
# - "check": build all targets and run all tests # - "check": build all targets and run all tests
# - "<arch>.clean" for any <arch> in ARCHES # - "<arch>.clean" for any <arch> in ARCHES
# - "clean": clean all ARCHES # - "clean": clean all ARCHES
...@@ -102,7 +102,8 @@ endif ...@@ -102,7 +102,8 @@ endif
# Architectures and modes to be compiled. Consider these to be internal # Architectures and modes to be compiled. Consider these to be internal
# variables, don't override them (use the targets instead). # variables, don't override them (use the targets instead).
ARCHES = ia32 x64 arm ARCHES = ia32 x64 arm mips
DEFAULT_ARCHES = ia32 x64 arm
MODES = release debug MODES = release debug
# List of files that trigger Makefile regeneration: # List of files that trigger Makefile regeneration:
...@@ -126,7 +127,7 @@ all: $(MODES) ...@@ -126,7 +127,7 @@ all: $(MODES)
# Compile targets. MODES and ARCHES are convenience targets. # Compile targets. MODES and ARCHES are convenience targets.
.SECONDEXPANSION: .SECONDEXPANSION:
$(MODES): $(addsuffix .$$@,$(ARCHES)) $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES))
$(ARCHES): $(addprefix $$@.,$(MODES)) $(ARCHES): $(addprefix $$@.,$(MODES))
...@@ -146,6 +147,7 @@ native: $(OUTDIR)/Makefile-native ...@@ -146,6 +147,7 @@ native: $(OUTDIR)/Makefile-native
# Test targets. # Test targets.
check: all check: all
@tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \ @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
--arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
$(TESTFLAGS) $(TESTFLAGS)
$(addsuffix .check,$(MODES)): $$(basename $$@) $(addsuffix .check,$(MODES)): $$(basename $$@)
...@@ -189,11 +191,16 @@ $(OUTDIR)/Makefile-x64: $(GYPFILES) $(ENVFILE) ...@@ -189,11 +191,16 @@ $(OUTDIR)/Makefile-x64: $(GYPFILES) $(ENVFILE)
-Ibuild/standalone.gypi --depth=. -Dtarget_arch=x64 \ -Ibuild/standalone.gypi --depth=. -Dtarget_arch=x64 \
-S-x64 $(GYPFLAGS) -S-x64 $(GYPFLAGS)
$(OUTDIR)/Makefile-arm: $(GYPFILES) $(ENVFILE) $(OUTDIR)/Makefile-arm: $(GYPFILES) $(ENVFILE) build/armu.gypi
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -Ibuild/armu.gypi \ -Ibuild/standalone.gypi --depth=. -Ibuild/armu.gypi \
-S-arm $(GYPFLAGS) -S-arm $(GYPFLAGS)
$(OUTDIR)/Makefile-mips: $(GYPFILES) $(ENVFILE) build/mipsu.gypi
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -Ibuild/mipsu.gypi \
-S-mips $(GYPFLAGS)
$(OUTDIR)/Makefile-native: $(GYPFILES) $(ENVFILE) $(OUTDIR)/Makefile-native: $(GYPFILES) $(ENVFILE)
build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -S-native $(GYPFLAGS) -Ibuild/standalone.gypi --depth=. -S-native $(GYPFLAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment