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

Side by Side Diff: Makefile

Issue 10908034: Add option to build using a standalone Android toolchain without Android NDK. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | Makefile.android » ('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 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 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 16 matching lines...) Expand all
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++ 30 CXX ?= g++
31 LINK ?= g++ 31 LINK ?= g++
32 OUTDIR ?= out 32 OUTDIR ?= out
33 TESTJOBS ?= -j16 33 TESTJOBS ?= -j16
34 GYPFLAGS ?= 34 GYPFLAGS ?=
35 TESTFLAGS ?= 35 TESTFLAGS ?=
36 ANDROID_NDK_ROOT ?= 36 ANDROID_NDK_ROOT ?=
37 ANDROID_TOOLCHAIN ?=
37 ANDROID_V8 ?= /data/local/v8 38 ANDROID_V8 ?= /data/local/v8
38 39
39 # Special build flags. Use them like this: "make library=shared" 40 # Special build flags. Use them like this: "make library=shared"
40 41
41 # library=shared || component=shared_library 42 # library=shared || component=shared_library
42 ifeq ($(library), shared) 43 ifeq ($(library), shared)
43 GYPFLAGS += -Dcomponent=shared_library 44 GYPFLAGS += -Dcomponent=shared_library
44 endif 45 endif
45 ifdef component 46 ifdef component
46 GYPFLAGS += -Dcomponent=$(component) 47 GYPFLAGS += -Dcomponent=$(component)
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 # Generates corresponding test targets, e.g. "ia32.release.check". 135 # Generates corresponding test targets, e.g. "ia32.release.check".
135 CHECKS = $(addsuffix .check,$(BUILDS)) 136 CHECKS = $(addsuffix .check,$(BUILDS))
136 ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS)) 137 ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS))
137 # File where previously used GYPFLAGS are stored. 138 # File where previously used GYPFLAGS are stored.
138 ENVFILE = $(OUTDIR)/environment 139 ENVFILE = $(OUTDIR)/environment
139 140
140 .PHONY: all check clean dependencies $(ENVFILE).new native \ 141 .PHONY: all check clean dependencies $(ENVFILE).new native \
141 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ 142 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
142 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ 143 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \
143 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ 144 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \
144 must-set-ANDROID_NDK_ROOT 145 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN
145 146
146 # Target definitions. "all" is the default. 147 # Target definitions. "all" is the default.
147 all: $(MODES) 148 all: $(MODES)
148 149
149 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile 150 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile
150 # having been created before. 151 # having been created before.
151 buildbot: 152 buildbot:
152 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ 153 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \
153 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)" 154 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)"
154 155
(...skipping 16 matching lines...) Expand all
171 builddir="$(shell pwd)/$(OUTDIR)/$@" 172 builddir="$(shell pwd)/$(OUTDIR)/$@"
172 173
173 native: $(OUTDIR)/Makefile.native 174 native: $(OUTDIR)/Makefile.native
174 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ 175 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \
175 CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \ 176 CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \
176 builddir="$(shell pwd)/$(OUTDIR)/$@" 177 builddir="$(shell pwd)/$(OUTDIR)/$@"
177 178
178 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) 179 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES))
179 180
180 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ 181 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \
181 must-set-ANDROID_NDK_ROOT Makefile.android 182 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android
182 @$(MAKE) -f Makefile.android $@ \ 183 @$(MAKE) -f Makefile.android $@ \
183 ARCH="$(basename $@)" \ 184 ARCH="$(basename $@)" \
184 MODE="$(subst .,,$(suffix $@))" \ 185 MODE="$(subst .,,$(suffix $@))" \
185 OUTDIR="$(OUTDIR)" \ 186 OUTDIR="$(OUTDIR)" \
186 GYPFLAGS="$(GYPFLAGS)" 187 GYPFLAGS="$(GYPFLAGS)"
187 188
188 # Test targets. 189 # Test targets.
189 check: all 190 check: all
190 @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \ 191 @tools/test-wrapper-gypbuild.py $(TESTJOBS) --outdir=$(OUTDIR) \
191 --arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \ 192 --arch=$(shell echo $(DEFAULT_ARCHES) | sed -e 's/ /,/g') \
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ 242 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
242 -Ibuild/standalone.gypi --depth=. \ 243 -Ibuild/standalone.gypi --depth=. \
243 -Dv8_target_arch=$(subst .,,$(suffix $@)) \ 244 -Dv8_target_arch=$(subst .,,$(suffix $@)) \
244 -S.$(subst .,,$(suffix $@)) $(GYPFLAGS) 245 -S.$(subst .,,$(suffix $@)) $(GYPFLAGS)
245 246
246 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) 247 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
247 GYP_GENERATORS=make \ 248 GYP_GENERATORS=make \
248 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ 249 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
249 -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) 250 -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
250 251
251 must-set-ANDROID_NDK_ROOT: 252 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
252 ifndef ANDROID_NDK_ROOT 253 ifndef ANDROID_NDK_ROOT
253 » $(error ANDROID_NDK_ROOT is not set) 254 ifndef ANDROID_TOOLCHAIN
255 » $(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set))
256 endif
254 endif 257 endif
255 258
256 # Replaces the old with the new environment file if they're different, which 259 # Replaces the old with the new environment file if they're different, which
257 # will trigger GYP to regenerate Makefiles. 260 # will trigger GYP to regenerate Makefiles.
258 $(ENVFILE): $(ENVFILE).new 261 $(ENVFILE): $(ENVFILE).new
259 @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) >/dev/null; \ 262 @if test -r $(ENVFILE) && cmp $(ENVFILE).new $(ENVFILE) >/dev/null; \
260 then rm $(ENVFILE).new; \ 263 then rm $(ENVFILE).new; \
261 else mv $(ENVFILE).new $(ENVFILE); fi 264 else mv $(ENVFILE).new $(ENVFILE); fi
262 265
263 # Stores current GYPFLAGS in a file. 266 # Stores current GYPFLAGS in a file.
264 $(ENVFILE).new: 267 $(ENVFILE).new:
265 @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new; \ 268 @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new; \
266 echo "CXX=$(CXX)" >> $(ENVFILE).new 269 echo "CXX=$(CXX)" >> $(ENVFILE).new
267 270
268 # Dependencies. 271 # Dependencies.
269 dependencies: 272 dependencies:
270 svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \ 273 svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \
271 --revision 1282 274 --revision 1282
OLDNEW
« no previous file with comments | « no previous file | Makefile.android » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698