| OLD | NEW |
| 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 13 matching lines...) Expand all Loading... |
| 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 OUTDIR ?= out | 30 OUTDIR ?= out |
| 31 TESTJOBS ?= | 31 TESTJOBS ?= |
| 32 GYPFLAGS ?= | 32 GYPFLAGS ?= |
| 33 TESTFLAGS ?= | 33 TESTFLAGS ?= |
| 34 ANDROID_NDK_ROOT ?= | |
| 35 ANDROID_NDK_HOST_ARCH ?= | 34 ANDROID_NDK_HOST_ARCH ?= |
| 36 ANDROID_TOOLCHAIN ?= | |
| 37 ANDROID_V8 ?= /data/local/tmp/v8 | 35 ANDROID_V8 ?= /data/local/tmp/v8 |
| 38 NACL_SDK_ROOT ?= | 36 NACL_SDK_ROOT ?= |
| 39 | 37 |
| 40 # Special build flags. Use them like this: "make library=shared" | 38 # Special build flags. Use them like this: "make library=shared" |
| 41 | 39 |
| 42 # library=shared || component=shared_library | 40 # library=shared || component=shared_library |
| 43 ifeq ($(library), shared) | 41 ifeq ($(library), shared) |
| 44 GYPFLAGS += -Dcomponent=shared_library | 42 GYPFLAGS += -Dcomponent=shared_library |
| 45 endif | 43 endif |
| 46 ifdef component | 44 ifdef component |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS)) | 272 NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS)) |
| 275 # File where previously used GYPFLAGS are stored. | 273 # File where previously used GYPFLAGS are stored. |
| 276 ENVFILE = $(OUTDIR)/environment | 274 ENVFILE = $(OUTDIR)/environment |
| 277 | 275 |
| 278 .PHONY: all check clean builddeps dependencies $(ENVFILE).new native \ | 276 .PHONY: all check clean builddeps dependencies $(ENVFILE).new native \ |
| 279 qc quickcheck $(QUICKCHECKS) turbocheck \ | 277 qc quickcheck $(QUICKCHECKS) turbocheck \ |
| 280 $(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \ | 278 $(addsuffix .quickcheck,$(MODES)) $(addsuffix .quickcheck,$(ARCHES)) \ |
| 281 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ | 279 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ |
| 282 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ | 280 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ |
| 283 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ | 281 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ |
| 284 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \ | |
| 285 $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \ | 282 $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \ |
| 286 must-set-NACL_SDK_ROOT | 283 must-set-NACL_SDK_ROOT |
| 287 | 284 |
| 288 # Target definitions. "all" is the default. | 285 # Target definitions. "all" is the default. |
| 289 all: $(DEFAULT_MODES) | 286 all: $(DEFAULT_MODES) |
| 290 | 287 |
| 291 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile | 288 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile |
| 292 # having been created before. | 289 # having been created before. |
| 293 buildbot: | 290 buildbot: |
| 294 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ | 291 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 308 raw_input().replace('opt', '').capitalize()") \ | 305 raw_input().replace('opt', '').capitalize()") \ |
| 309 builddir="$(shell pwd)/$(OUTDIR)/$@" | 306 builddir="$(shell pwd)/$(OUTDIR)/$@" |
| 310 | 307 |
| 311 native: $(OUTDIR)/Makefile.native | 308 native: $(OUTDIR)/Makefile.native |
| 312 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ | 309 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ |
| 313 BUILDTYPE=Release \ | 310 BUILDTYPE=Release \ |
| 314 builddir="$(shell pwd)/$(OUTDIR)/$@" | 311 builddir="$(shell pwd)/$(OUTDIR)/$@" |
| 315 | 312 |
| 316 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) | 313 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) |
| 317 | 314 |
| 318 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) \ | 315 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) Makefile.android |
| 319 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN Makefile.android | |
| 320 @$(MAKE) -f Makefile.android $@ \ | 316 @$(MAKE) -f Makefile.android $@ \ |
| 321 ARCH="$(basename $@)" \ | 317 ARCH="$(basename $@)" \ |
| 322 MODE="$(subst .,,$(suffix $@))" \ | 318 MODE="$(subst .,,$(suffix $@))" \ |
| 323 OUTDIR="$(OUTDIR)" \ | 319 OUTDIR="$(OUTDIR)" \ |
| 324 GYPFLAGS="$(GYPFLAGS)" | 320 GYPFLAGS="$(GYPFLAGS)" |
| 325 | 321 |
| 326 $(NACL_ARCHES): $(addprefix $$@.,$(MODES)) | 322 $(NACL_ARCHES): $(addprefix $$@.,$(MODES)) |
| 327 | 323 |
| 328 $(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \ | 324 $(NACL_BUILDS): $(GYPFILES) $(ENVFILE) \ |
| 329 Makefile.nacl must-set-NACL_SDK_ROOT | 325 Makefile.nacl must-set-NACL_SDK_ROOT |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 -Dtarget_arch=$(V8_TARGET_ARCH),) \ | 441 -Dtarget_arch=$(V8_TARGET_ARCH),) \ |
| 446 $(if $(findstring optdebug,$@),-Dv8_optimized_debug=1,) \ | 442 $(if $(findstring optdebug,$@),-Dv8_optimized_debug=1,) \ |
| 447 -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) | 443 -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) |
| 448 | 444 |
| 449 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) | 445 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) |
| 450 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:
$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \ | 446 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(shell pwd)/build:
$(PYTHONPATH):$(shell pwd)/build/gyp/pylib:$(PYTHONPATH)" \ |
| 451 GYP_GENERATORS=make \ | 447 GYP_GENERATORS=make \ |
| 452 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ | 448 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ |
| 453 -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) | 449 -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) |
| 454 | 450 |
| 455 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN: | |
| 456 ifndef ANDROID_NDK_ROOT | |
| 457 ifndef ANDROID_TOOLCHAIN | |
| 458 $(error ANDROID_NDK_ROOT or ANDROID_TOOLCHAIN must be set)) | |
| 459 endif | |
| 460 endif | |
| 461 | |
| 462 # Note that NACL_SDK_ROOT must be set to point to an appropriate | 451 # Note that NACL_SDK_ROOT must be set to point to an appropriate |
| 463 # Native Client SDK before using this makefile. You can download | 452 # Native Client SDK before using this makefile. You can download |
| 464 # an SDK here: | 453 # an SDK here: |
| 465 # https://developers.google.com/native-client/sdk/download | 454 # https://developers.google.com/native-client/sdk/download |
| 466 # The path indicated by NACL_SDK_ROOT will typically end with | 455 # The path indicated by NACL_SDK_ROOT will typically end with |
| 467 # a folder for a pepper version such as "pepper_25" that should | 456 # a folder for a pepper version such as "pepper_25" that should |
| 468 # have "tools" and "toolchain" subdirectories. | 457 # have "tools" and "toolchain" subdirectories. |
| 469 must-set-NACL_SDK_ROOT: | 458 must-set-NACL_SDK_ROOT: |
| 470 ifndef NACL_SDK_ROOT | 459 ifndef NACL_SDK_ROOT |
| 471 $(error NACL_SDK_ROOT must be set) | 460 $(error NACL_SDK_ROOT must be set) |
| (...skipping 27 matching lines...) Expand all Loading... |
| 499 # We need to manually set the stack limit here, to work around bugs in | 488 # We need to manually set the stack limit here, to work around bugs in |
| 500 # gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems. | 489 # gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems. |
| 501 GPATH GRTAGS GSYMS GTAGS: gtags.files $(shell cat gtags.files 2> /dev/null) | 490 GPATH GRTAGS GSYMS GTAGS: gtags.files $(shell cat gtags.files 2> /dev/null) |
| 502 @bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<' | 491 @bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<' |
| 503 | 492 |
| 504 gtags.clean: | 493 gtags.clean: |
| 505 rm -f gtags.files GPATH GRTAGS GSYMS GTAGS | 494 rm -f gtags.files GPATH GRTAGS GSYMS GTAGS |
| 506 | 495 |
| 507 dependencies builddeps: | 496 dependencies builddeps: |
| 508 $(error Use 'gclient sync' instead) | 497 $(error Use 'gclient sync' instead) |
| OLD | NEW |