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

Side by Side Diff: Makefile

Issue 7860035: Merge bleeding edge up to 9192 into the GC branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « MERGE ('k') | benchmarks/crypto.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 28
29 # Variable default definitions. Override them by exporting them in your shell. 29 # Variable default definitions. Override them by exporting them in your shell.
30 CXX ?= "g++" # For distcc: export CXX="distcc g++" 30 CXX ?= "g++" # For distcc: export CXX="distcc g++"
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 ?=
35 35
36 # Architectures and modes to be compiled. 36 # Special build flags. Use them like this: "make library=shared"
37
38 # library=shared || component=shared_library
39 ifeq ($(library), shared)
40 GYPFLAGS += -Dcomponent=shared_library
41 endif
42 ifdef component
43 GYPFLAGS += -Dcomponent=$(component)
44 endif
45 # console=readline
46 ifdef console
47 GYPFLAGS += -Dconsole=$(console)
48 endif
49 # disassembler=on
50 ifeq ($(disassembler), on)
51 GYPFLAGS += -Dv8_enable_disassembler=1
52 endif
53 # snapshot=off
54 ifeq ($(snapshot), off)
55 GYPFLAGS += -Dv8_use_snapshot='false'
56 endif
57 # gdbjit=on
58 ifeq ($(gdbjit), on)
59 GYPFLAGS += -Dv8_enable_gdbjit=1
60 endif
61 # liveobjectlist=on
62 ifeq ($(liveobjectlist), on)
63 GYPFLAGS += -Dv8_use_liveobjectlist=true
64 endif
65 # vfp3=off
66 ifeq ($(vfp3), off)
67 GYPFLAGS += -Dv8_can_use_vfp_instructions=false
68 else
69 GYPFLAGS += -Dv8_can_use_vfp_instructions=true
70 endif
71
72 # ----------------- available targets: --------------------
73 # - "dependencies": pulls in external dependencies (currently: GYP)
74 # - any arch listed in ARCHES (see below)
75 # - any mode listed in MODES
76 # - every combination <arch>.<mode>, e.g. "ia32.release"
77 # - any of the above with .check appended, e.g. "ia32.release.check"
78 # - default (no target specified): build all ARCHES and MODES
79 # - "check": build all targets and run all tests
80 # - "<arch>.clean" for any <arch> in ARCHES
81 # - "clean": clean all ARCHES
82
83 # ----------------- internal stuff ------------------------
84
85 # Architectures and modes to be compiled. Consider these to be internal
86 # variables, don't override them (use the targets instead).
37 ARCHES = ia32 x64 arm 87 ARCHES = ia32 x64 arm
38 MODES = release debug 88 MODES = release debug
39 89
40 # List of files that trigger Makefile regeneration: 90 # List of files that trigger Makefile regeneration:
41 GYPFILES = build/all.gyp build/common.gypi build/standalone.gypi \ 91 GYPFILES = build/all.gyp build/common.gypi build/standalone.gypi \
42 preparser/preparser.gyp samples/samples.gyp src/d8.gyp \ 92 preparser/preparser.gyp samples/samples.gyp src/d8.gyp \
43 test/cctest/cctest.gyp tools/gyp/v8.gyp 93 test/cctest/cctest.gyp tools/gyp/v8.gyp
44 94
45 # Generates all combinations of ARCHES and MODES, e.g. "ia32.release". 95 # Generates all combinations of ARCHES and MODES, e.g. "ia32.release".
46 BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES))) 96 BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES)))
97 # Generates corresponding test targets, e.g. "ia32.release.check".
47 CHECKS = $(addsuffix .check,$(BUILDS)) 98 CHECKS = $(addsuffix .check,$(BUILDS))
48 # Generates corresponding test targets, e.g. "ia32.release.check". 99 # File where previously used GYPFLAGS are stored.
100 ENVFILE = $(OUTDIR)/environment
49 101
50 .PHONY: all release debug ia32 x64 arm $(BUILDS) 102 .PHONY: all check clean dependencies $(ENVFILE).new \
103 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
104 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES))
51 105
52 # Target definitions. "all" is the default, you can specify any others on the 106 # Target definitions. "all" is the default.
53 # command line, e.g. "make ia32". Targets defined in $(BUILDS), e.g. 107 all: $(MODES)
54 # "ia32.debug", can also be specified.
55 all: release debug
56 108
57 release: $(addsuffix .release,$(ARCHES)) 109 # Compile targets. MODES and ARCHES are convenience targets.
110 .SECONDEXPANSION:
111 $(MODES): $(addsuffix .$$@,$(ARCHES))
58 112
59 debug: $(addsuffix .debug,$(ARCHES)) 113 $(ARCHES): $(addprefix $$@.,$(MODES))
60 114
61 ia32: $(addprefix ia32.,$(MODES)) 115 # Defines how to build a particular target (e.g. ia32.release).
62
63 x64: $(addprefix x64.,$(MODES))
64
65 arm: $(addprefix arm.,$(MODES))
66
67 .SECONDEXPANSION:
68 $(BUILDS): $(OUTDIR)/Makefile-$$(basename $$@) 116 $(BUILDS): $(OUTDIR)/Makefile-$$(basename $$@)
69 @$(MAKE) -C "$(OUTDIR)" -f Makefile-$(basename $@) \ 117 @$(MAKE) -C "$(OUTDIR)" -f Makefile-$(basename $@) \
70 CXX="$(CXX)" LINK="$(LINK)" \ 118 CXX="$(CXX)" LINK="$(LINK)" \
71 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ 119 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
72 python -c "print raw_input().capitalize()") \ 120 python -c "print raw_input().capitalize()") \
73 builddir="$(shell pwd)/$(OUTDIR)/$@" 121 builddir="$(shell pwd)/$(OUTDIR)/$@"
74 122
75 # Test targets. 123 # Test targets.
76 check: all 124 check: all
77 @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) 125 @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR)
78 126
79 $(addsuffix .check,$(MODES)): $$(basename $$@) 127 $(addsuffix .check,$(MODES)): $$(basename $$@)
80 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --mode=$( basename $@) 128 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
129 » --mode=$(basename $@)
81 130
82 $(addsuffix .check,$(ARCHES)): $$(basename $$@) 131 $(addsuffix .check,$(ARCHES)): $$(basename $$@)
83 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --arch=$( basename $@) 132 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
133 » --arch=$(basename $@)
84 134
85 $(CHECKS): $$(basename $$@) 135 $(CHECKS): $$(basename $$@)
86 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) --arch-an d-mode=$(basename $@) 136 » @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
137 » --arch-and-mode=$(basename $@)
87 138
88 # Clean targets. You can clean each architecture individually, or everything. 139 # Clean targets. You can clean each architecture individually, or everything.
89 $(addsuffix .clean,$(ARCHES)): 140 $(addsuffix .clean,$(ARCHES)):
90 rm -f $(OUTDIR)/Makefile-$(basename $@) 141 rm -f $(OUTDIR)/Makefile-$(basename $@)
91 rm -rf $(OUTDIR)/$(basename $@).release 142 rm -rf $(OUTDIR)/$(basename $@).release
92 rm -rf $(OUTDIR)/$(basename $@).debug 143 rm -rf $(OUTDIR)/$(basename $@).debug
93 find $(OUTDIR) -regex '.*\(host\|target\)-$(basename $@)\.mk' -delete 144 find $(OUTDIR) -regex '.*\(host\|target\)-$(basename $@)\.mk' -delete
94 145
95 clean: $(addsuffix .clean,$(ARCHES)) 146 clean: $(addsuffix .clean,$(ARCHES))
96 147
97 # GYP file generation targets. 148 # GYP file generation targets.
98 $(OUTDIR)/Makefile-ia32: $(GYPFILES) 149 $(OUTDIR)/Makefile-ia32: $(GYPFILES) $(ENVFILE)
99 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ 150 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
100 » -Ibuild/standalone.gypi --depth=. -Dtarget_arch=ia32 -S-ia 32 \ 151 » -Ibuild/standalone.gypi --depth=. -Dtarget_arch=ia32 \
101 » $(GYPFLAGS) 152 » -S-ia32 $(GYPFLAGS)
102 153
103 $(OUTDIR)/Makefile-x64: $(GYPFILES) 154 $(OUTDIR)/Makefile-x64: $(GYPFILES) $(ENVFILE)
104 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ 155 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
105 » -Ibuild/standalone.gypi --depth=. -Dtarget_arch=x64 -S-x64 \ 156 » -Ibuild/standalone.gypi --depth=. -Dtarget_arch=x64 \
106 » $(GYPFLAGS) 157 » -S-x64 $(GYPFLAGS)
107 158
108 $(OUTDIR)/Makefile-arm: $(GYPFILES) build/armu.gypi 159 $(OUTDIR)/Makefile-arm: $(GYPFILES) $(ENVFILE)
109 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ 160 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
110 » -Ibuild/standalone.gypi --depth=. -Ibuild/armu.gypi -S-arm \ 161 » -Ibuild/standalone.gypi --depth=. -Ibuild/armu.gypi \
111 » $(GYPFLAGS) 162 » -S-arm $(GYPFLAGS)
163
164 # Replaces the old with the new environment file if they're different, which
165 # will trigger GYP to regenerate Makefiles.
166 $(ENVFILE): $(ENVFILE).new
167 » @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) >/dev/null; \
168 » then rm $(ENVFILE).new; \
169 » else mv $(ENVFILE).new $(ENVFILE); fi
170
171 # Stores current GYPFLAGS in a file.
172 $(ENVFILE).new:
173 » @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new;
174
175 # Dependencies.
176 dependencies:
177 » svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \
178 » --revision 1026
OLDNEW
« no previous file with comments | « MERGE ('k') | benchmarks/crypto.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698