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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 ifeq ($(no_omit_framepointer), on) | 233 ifeq ($(no_omit_framepointer), on) |
234 GYPFLAGS += -Drelease_extra_cflags=-fno-omit-frame-pointer | 234 GYPFLAGS += -Drelease_extra_cflags=-fno-omit-frame-pointer |
235 endif | 235 endif |
236 | 236 |
237 ifdef android_ndk_root | 237 ifdef android_ndk_root |
238 GYPFLAGS += -Dandroid_ndk_root=$(android_ndk_root) | 238 GYPFLAGS += -Dandroid_ndk_root=$(android_ndk_root) |
239 export ANDROID_NDK_ROOT = $(android_ndk_root) | 239 export ANDROID_NDK_ROOT = $(android_ndk_root) |
240 endif | 240 endif |
241 | 241 |
242 # ----------------- available targets: -------------------- | 242 # ----------------- available targets: -------------------- |
243 # - "grokdump": rebuilds heap constants lists used by grokdump | |
244 # - any arch listed in ARCHES (see below) | 243 # - any arch listed in ARCHES (see below) |
245 # - any mode listed in MODES | 244 # - any mode listed in MODES |
246 # - every combination <arch>.<mode>, e.g. "ia32.release" | 245 # - every combination <arch>.<mode>, e.g. "ia32.release" |
247 # - "native": current host's architecture, release mode | 246 # - "native": current host's architecture, release mode |
248 # - any of the above with .check appended, e.g. "ia32.release.check" | 247 # - any of the above with .check appended, e.g. "ia32.release.check" |
249 # - "android": cross-compile for Android/ARM | 248 # - "android": cross-compile for Android/ARM |
250 # - default (no target specified): build all DEFAULT_ARCHES and MODES | 249 # - default (no target specified): build all DEFAULT_ARCHES and MODES |
251 # - "check": build all targets and run all tests | 250 # - "check": build all targets and run all tests |
252 # - "<arch>.clean" for any <arch> in ARCHES | 251 # - "<arch>.clean" for any <arch> in ARCHES |
253 # - "clean": clean all ARCHES | 252 # - "clean": clean all ARCHES |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 else mv $(ENVFILE).new $(ENVFILE); fi | 459 else mv $(ENVFILE).new $(ENVFILE); fi |
461 | 460 |
462 # Stores current GYPFLAGS in a file. | 461 # Stores current GYPFLAGS in a file. |
463 $(ENVFILE).new: | 462 $(ENVFILE).new: |
464 $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ | 463 $(eval CXX_TARGET_ARCH:=$(shell $(CXX) -v 2>&1 | grep ^Target: | \ |
465 cut -f 2 -d " " | cut -f 1 -d "-" )) | 464 cut -f 2 -d " " | cut -f 1 -d "-" )) |
466 $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) | 465 $(eval CXX_TARGET_ARCH:=$(subst aarch64,arm64,$(CXX_TARGET_ARCH))) |
467 $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) | 466 $(eval CXX_TARGET_ARCH:=$(subst x86_64,x64,$(CXX_TARGET_ARCH))) |
468 @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARG
ET_ARCH)" > $(ENVFILE).new; | 467 @mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS) -Dtarget_arch=$(CXX_TARG
ET_ARCH)" > $(ENVFILE).new; |
469 | 468 |
470 # Heap constants for grokdump. | |
471 DUMP_FILE = tools/v8heapconst.py | |
472 grokdump: ia32.release | |
473 @cat $(DUMP_FILE).tmpl > $(DUMP_FILE) | |
474 @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE) | |
475 | |
476 # Support for the GNU GLOBAL Source Code Tag System. | 469 # Support for the GNU GLOBAL Source Code Tag System. |
477 gtags.files: $(GYPFILES) $(ENVFILE) | 470 gtags.files: $(GYPFILES) $(ENVFILE) |
478 @find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@ | 471 @find include src test -name '*.h' -o -name '*.cc' -o -name '*.c' > $@ |
479 | 472 |
480 # We need to manually set the stack limit here, to work around bugs in | 473 # We need to manually set the stack limit here, to work around bugs in |
481 # gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems. | 474 # gmake-3.81 and global-5.7.1 on recent 64-bit Linux systems. |
482 # Using $(wildcard ...) gracefully ignores non-existing files, so that stale | 475 # Using $(wildcard ...) gracefully ignores non-existing files, so that stale |
483 # gtags.files after switching branches don't cause recipe failures. | 476 # gtags.files after switching branches don't cause recipe failures. |
484 GPATH GRTAGS GSYMS GTAGS: gtags.files $(wildcard $(shell cat gtags.files 2> /dev
/null)) | 477 GPATH GRTAGS GSYMS GTAGS: gtags.files $(wildcard $(shell cat gtags.files 2> /dev
/null)) |
485 @bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<' | 478 @bash -c 'ulimit -s 10240 && GTAGSFORCECPP=yes gtags -i -q -f $<' |
486 | 479 |
487 gtags.clean: | 480 gtags.clean: |
488 rm -f gtags.files GPATH GRTAGS GSYMS GTAGS | 481 rm -f gtags.files GPATH GRTAGS GSYMS GTAGS |
489 | 482 |
490 tags: gtags.files $(wildcard $(shell cat gtags.files 2> /dev/null)) | 483 tags: gtags.files $(wildcard $(shell cat gtags.files 2> /dev/null)) |
491 @(ctags --version | grep 'Exuberant Ctags' >/dev/null) || \ | 484 @(ctags --version | grep 'Exuberant Ctags' >/dev/null) || \ |
492 (echo "Please install Exuberant Ctags (check 'ctags --version')"
>&2; false) | 485 (echo "Please install Exuberant Ctags (check 'ctags --version')"
>&2; false) |
493 ctags --fields=+l -L $< | 486 ctags --fields=+l -L $< |
494 | 487 |
495 tags.clean: | 488 tags.clean: |
496 rm -r tags | 489 rm -r tags |
497 | 490 |
498 dependencies builddeps: | 491 dependencies builddeps: |
499 $(error Use 'gclient sync' instead) | 492 $(error Use 'gclient sync' instead) |
OLD | NEW |