| OLD | NEW |
| 1 # Copyright 2011 the V8 project authors. All rights reserved. | 1 # Copyright 2011 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 LINK ?= "g++" | 31 LINK ?= "g++" |
| 32 OUTDIR ?= out | 32 OUTDIR ?= out |
| 33 TESTJOBS ?= -j16 | 33 TESTJOBS ?= -j16 |
| 34 GYPFLAGS ?= -Dv8_can_use_vfp_instructions=true | 34 GYPFLAGS ?= -Dv8_can_use_vfp_instructions=true |
| 35 | 35 |
| 36 # Architectures and modes to be compiled. | 36 # Architectures and modes to be compiled. |
| 37 ARCHES = ia32 x64 arm | 37 ARCHES = ia32 x64 arm |
| 38 MODES = release debug | 38 MODES = release debug |
| 39 | 39 |
| 40 # List of files that trigger Makefile regeneration: | 40 # List of files that trigger Makefile regeneration: |
| 41 GYPFILES = build/all.gyp build/common.gypi build/v8-features.gypi \ | 41 GYPFILES = build/all.gyp build/common.gypi build/standalone.gypi \ |
| 42 preparser/preparser.gyp samples/samples.gyp src/d8.gyp \ | 42 preparser/preparser.gyp samples/samples.gyp src/d8.gyp \ |
| 43 test/cctest/cctest.gyp tools/gyp/v8.gyp | 43 test/cctest/cctest.gyp tools/gyp/v8.gyp |
| 44 | 44 |
| 45 # Generates all combinations of ARCHES and MODES, e.g. "ia32.release". | 45 # Generates all combinations of ARCHES and MODES, e.g. "ia32.release". |
| 46 BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES))) | 46 BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES))) |
| 47 CHECKS = $(addsuffix .check,$(BUILDS)) | 47 CHECKS = $(addsuffix .check,$(BUILDS)) |
| 48 # Generates corresponding test targets, e.g. "ia32.release.check". | 48 # Generates corresponding test targets, e.g. "ia32.release.check". |
| 49 | 49 |
| 50 .PHONY: all release debug ia32 x64 arm $(BUILDS) | 50 .PHONY: all release debug ia32 x64 arm $(BUILDS) |
| 51 | 51 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 67 .SECONDEXPANSION: | 67 .SECONDEXPANSION: |
| 68 $(BUILDS): $(OUTDIR)/Makefile-$$(basename $$@) | 68 $(BUILDS): $(OUTDIR)/Makefile-$$(basename $$@) |
| 69 @$(MAKE) -C "$(OUTDIR)" -f Makefile-$(basename $@) \ | 69 @$(MAKE) -C "$(OUTDIR)" -f Makefile-$(basename $@) \ |
| 70 CXX="$(CXX)" LINK="$(LINK)" \ | 70 CXX="$(CXX)" LINK="$(LINK)" \ |
| 71 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ | 71 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ |
| 72 python -c "print raw_input().capitalize()") \ | 72 python -c "print raw_input().capitalize()") \ |
| 73 builddir="$(shell pwd)/$(OUTDIR)/$@" | 73 builddir="$(shell pwd)/$(OUTDIR)/$@" |
| 74 | 74 |
| 75 # Test targets. | 75 # Test targets. |
| 76 check: all | 76 check: all |
| 77 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) | 77 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) |
| 78 | 78 |
| 79 debug.check: debug | 79 $(addsuffix .check,$(MODES)): $$(basename $$@) |
| 80 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --mode=debug | 80 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --mode=$(
basename $@) |
| 81 | |
| 82 release.check: release | |
| 83 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --mode=release | |
| 84 | 81 |
| 85 $(addsuffix .check,$(ARCHES)): $$(basename $$@) | 82 $(addsuffix .check,$(ARCHES)): $$(basename $$@) |
| 86 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --arch=$(basename $@) | 83 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --arch=$(
basename $@) |
| 87 | 84 |
| 88 $(CHECKS): $$(basename $$@) | 85 $(CHECKS): $$(basename $$@) |
| 89 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --arch-and-mode=$(basename $
@) | 86 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --arch-an
d-mode=$(basename $@) |
| 90 | 87 |
| 91 # Clean targets. You can clean each architecture individually, or everything. | 88 # Clean targets. You can clean each architecture individually, or everything. |
| 92 $(addsuffix .clean,$(ARCHES)): | 89 $(addsuffix .clean,$(ARCHES)): |
| 93 rm -f $(OUTDIR)/Makefile-$(basename $@) | 90 rm -f $(OUTDIR)/Makefile-$(basename $@) |
| 94 rm -rf $(OUTDIR)/$(basename $@).release | 91 rm -rf $(OUTDIR)/$(basename $@).release |
| 95 rm -rf $(OUTDIR)/$(basename $@).debug | 92 rm -rf $(OUTDIR)/$(basename $@).debug |
| 93 find $(OUTDIR) -regex '.*\(host\|target\)-$(basename $@)\.mk' -delete |
| 96 | 94 |
| 97 clean: $(addsuffix .clean,$(ARCHES)) | 95 clean: $(addsuffix .clean,$(ARCHES)) |
| 98 | 96 |
| 99 # GYP file generation targets. | 97 # GYP file generation targets. |
| 100 $(OUTDIR)/Makefile-ia32: $(GYPFILES) | 98 $(OUTDIR)/Makefile-ia32: $(GYPFILES) |
| 101 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ | 99 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ |
| 102 » -Ibuild/common.gypi --depth=. -Dtarget_arch=ia32 -S-ia32 \ | 100 » -Ibuild/standalone.gypi --depth=. -Dtarget_arch=ia32 -S-ia
32 \ |
| 103 $(GYPFLAGS) | 101 $(GYPFLAGS) |
| 104 | 102 |
| 105 $(OUTDIR)/Makefile-x64: $(GYPFILES) | 103 $(OUTDIR)/Makefile-x64: $(GYPFILES) |
| 106 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ | 104 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ |
| 107 » -Ibuild/common.gypi --depth=. -Dtarget_arch=x64 -S-x64 \ | 105 » -Ibuild/standalone.gypi --depth=. -Dtarget_arch=x64 -S-x64
\ |
| 108 $(GYPFLAGS) | 106 $(GYPFLAGS) |
| 109 | 107 |
| 110 $(OUTDIR)/Makefile-arm: $(GYPFILES) build/armu.gypi | 108 $(OUTDIR)/Makefile-arm: $(GYPFILES) build/armu.gypi |
| 111 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ | 109 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ |
| 112 » -Ibuild/common.gypi --depth=. -Ibuild/armu.gypi -S-arm \ | 110 » -Ibuild/standalone.gypi --depth=. -Ibuild/armu.gypi -S-arm
\ |
| 113 $(GYPFLAGS) | 111 $(GYPFLAGS) |
| OLD | NEW |