| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 endif | 87 endif |
| 88 ifeq ($(gdbjit), off) | 88 ifeq ($(gdbjit), off) |
| 89 GYPFLAGS += -Dv8_enable_gdbjit=0 | 89 GYPFLAGS += -Dv8_enable_gdbjit=0 |
| 90 endif | 90 endif |
| 91 # vtunejit=on | 91 # vtunejit=on |
| 92 ifeq ($(vtunejit), on) | 92 ifeq ($(vtunejit), on) |
| 93 GYPFLAGS += -Dv8_enable_vtunejit=1 | 93 GYPFLAGS += -Dv8_enable_vtunejit=1 |
| 94 endif | 94 endif |
| 95 # optdebug=on | 95 # optdebug=on |
| 96 ifeq ($(optdebug), on) | 96 ifeq ($(optdebug), on) |
| 97 GYPFLAGS += -Dv8_optimized_debug=1 | 97 GYPFLAGS += -Dv8_optimized_debug=2 |
| 98 endif | 98 endif |
| 99 # debuggersupport=off | 99 # debuggersupport=off |
| 100 ifeq ($(debuggersupport), off) | 100 ifeq ($(debuggersupport), off) |
| 101 GYPFLAGS += -Dv8_enable_debugger_support=0 | 101 GYPFLAGS += -Dv8_enable_debugger_support=0 |
| 102 endif | 102 endif |
| 103 # unalignedaccess=on | 103 # unalignedaccess=on |
| 104 ifeq ($(unalignedaccess), on) | 104 ifeq ($(unalignedaccess), on) |
| 105 GYPFLAGS += -Dv8_can_use_unaligned_accesses=true | 105 GYPFLAGS += -Dv8_can_use_unaligned_accesses=true |
| 106 endif | 106 endif |
| 107 # randomseed=12345, disable random seed via randomseed=0 | 107 # randomseed=12345, disable random seed via randomseed=0 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 131 # i18nsupport=off | 131 # i18nsupport=off |
| 132 ifeq ($(i18nsupport), off) | 132 ifeq ($(i18nsupport), off) |
| 133 GYPFLAGS += -Dv8_enable_i18n_support=0 | 133 GYPFLAGS += -Dv8_enable_i18n_support=0 |
| 134 TESTFLAGS += --noi18n | 134 TESTFLAGS += --noi18n |
| 135 endif | 135 endif |
| 136 # deprecation_warnings=on | 136 # deprecation_warnings=on |
| 137 ifeq ($(deprecationwarnings), on) | 137 ifeq ($(deprecationwarnings), on) |
| 138 GYPFLAGS += -Dv8_deprecation_warnings=1 | 138 GYPFLAGS += -Dv8_deprecation_warnings=1 |
| 139 endif | 139 endif |
| 140 # arm specific flags. | 140 # arm specific flags. |
| 141 # armv7=false/true | 141 # arm_version=<number | "default"> |
| 142 ifneq ($(strip $(arm_version)),) |
| 143 GYPFLAGS += -Darm_version=$(arm_version) |
| 144 else |
| 145 # Deprecated (use arm_version instead): armv7=false/true |
| 142 ifeq ($(armv7), false) | 146 ifeq ($(armv7), false) |
| 143 GYPFLAGS += -Darmv7=0 | 147 GYPFLAGS += -Darm_version=6 |
| 144 else | 148 else |
| 145 ifeq ($(armv7), true) | 149 ifeq ($(armv7), true) |
| 146 GYPFLAGS += -Darmv7=1 | 150 GYPFLAGS += -Darm_version=7 |
| 151 endif |
| 147 endif | 152 endif |
| 148 endif | 153 endif |
| 149 # vfp2=off. Deprecated, use armfpu= | 154 # vfp2=off. Deprecated, use armfpu= |
| 150 # vfp3=off. Deprecated, use armfpu= | 155 # vfp3=off. Deprecated, use armfpu= |
| 151 ifeq ($(vfp3), off) | 156 ifeq ($(vfp3), off) |
| 152 GYPFLAGS += -Darm_fpu=vfp | 157 GYPFLAGS += -Darm_fpu=vfp |
| 153 endif | 158 endif |
| 154 # hardfp=on/off. Deprecated, use armfloatabi | 159 # hardfp=on/off. Deprecated, use armfloatabi |
| 155 ifeq ($(hardfp),on) | 160 ifeq ($(hardfp),on) |
| 156 GYPFLAGS += -Darm_float_abi=hard | 161 GYPFLAGS += -Darm_float_abi=hard |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 # - "check": build all targets and run all tests | 218 # - "check": build all targets and run all tests |
| 214 # - "<arch>.clean" for any <arch> in ARCHES | 219 # - "<arch>.clean" for any <arch> in ARCHES |
| 215 # - "clean": clean all ARCHES | 220 # - "clean": clean all ARCHES |
| 216 | 221 |
| 217 # ----------------- internal stuff ------------------------ | 222 # ----------------- internal stuff ------------------------ |
| 218 | 223 |
| 219 # Architectures and modes to be compiled. Consider these to be internal | 224 # Architectures and modes to be compiled. Consider these to be internal |
| 220 # variables, don't override them (use the targets instead). | 225 # variables, don't override them (use the targets instead). |
| 221 ARCHES = ia32 x64 arm mipsel | 226 ARCHES = ia32 x64 arm mipsel |
| 222 DEFAULT_ARCHES = ia32 x64 arm | 227 DEFAULT_ARCHES = ia32 x64 arm |
| 223 MODES = release debug | 228 MODES = release debug optdebug |
| 229 DEFAULT_MODES = release debug |
| 224 ANDROID_ARCHES = android_ia32 android_arm android_mipsel | 230 ANDROID_ARCHES = android_ia32 android_arm android_mipsel |
| 225 NACL_ARCHES = nacl_ia32 nacl_x64 | 231 NACL_ARCHES = nacl_ia32 nacl_x64 |
| 226 | 232 |
| 227 # List of files that trigger Makefile regeneration: | 233 # List of files that trigger Makefile regeneration: |
| 228 GYPFILES = build/all.gyp build/features.gypi build/standalone.gypi \ | 234 GYPFILES = build/all.gyp build/features.gypi build/standalone.gypi \ |
| 229 build/toolchain.gypi samples/samples.gyp src/d8.gyp \ | 235 build/toolchain.gypi samples/samples.gyp src/d8.gyp \ |
| 230 test/cctest/cctest.gyp tools/gyp/v8.gyp | 236 test/cctest/cctest.gyp tools/gyp/v8.gyp |
| 231 | 237 |
| 232 # If vtunejit=on, the v8vtune.gyp will be appended. | 238 # If vtunejit=on, the v8vtune.gyp will be appended. |
| 233 ifeq ($(vtunejit), on) | 239 ifeq ($(vtunejit), on) |
| 234 GYPFILES += src/third_party/vtune/v8vtune.gyp | 240 GYPFILES += src/third_party/vtune/v8vtune.gyp |
| 235 endif | 241 endif |
| 236 # Generates all combinations of ARCHES and MODES, e.g. "ia32.release". | 242 # Generates all combinations of ARCHES and MODES, e.g. "ia32.release". |
| 237 BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES))) | 243 BUILDS = $(foreach mode,$(MODES),$(addsuffix .$(mode),$(ARCHES))) |
| 238 ANDROID_BUILDS = $(foreach mode,$(MODES), \ | 244 ANDROID_BUILDS = $(foreach mode,$(MODES), \ |
| 239 $(addsuffix .$(mode),$(ANDROID_ARCHES))) | 245 $(addsuffix .$(mode),$(ANDROID_ARCHES))) |
| 240 NACL_BUILDS = $(foreach mode,$(MODES), \ | 246 NACL_BUILDS = $(foreach mode,$(MODES), \ |
| 241 $(addsuffix .$(mode),$(NACL_ARCHES))) | 247 $(addsuffix .$(mode),$(NACL_ARCHES))) |
| 242 # Generates corresponding test targets, e.g. "ia32.release.check". | 248 # Generates corresponding test targets, e.g. "ia32.release.check". |
| 243 CHECKS = $(addsuffix .check,$(BUILDS)) | 249 CHECKS = $(addsuffix .check,$(BUILDS)) |
| 244 ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS)) | 250 ANDROID_CHECKS = $(addsuffix .check,$(ANDROID_BUILDS)) |
| 245 NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS)) | 251 NACL_CHECKS = $(addsuffix .check,$(NACL_BUILDS)) |
| 246 # File where previously used GYPFLAGS are stored. | 252 # File where previously used GYPFLAGS are stored. |
| 247 ENVFILE = $(OUTDIR)/environment | 253 ENVFILE = $(OUTDIR)/environment |
| 248 | 254 |
| 249 .PHONY: all check clean dependencies $(ENVFILE).new native \ | 255 .PHONY: all check clean dependencies $(ENVFILE).new native \ |
| 256 qc quickcheck \ |
| 250 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ | 257 $(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \ |
| 251 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ | 258 $(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES)) \ |
| 252 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ | 259 $(ANDROID_ARCHES) $(ANDROID_BUILDS) $(ANDROID_CHECKS) \ |
| 253 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \ | 260 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN \ |
| 254 $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \ | 261 $(NACL_ARCHES) $(NACL_BUILDS) $(NACL_CHECKS) \ |
| 255 must-set-NACL_SDK_ROOT | 262 must-set-NACL_SDK_ROOT |
| 256 | 263 |
| 257 # Target definitions. "all" is the default. | 264 # Target definitions. "all" is the default. |
| 258 all: $(MODES) | 265 all: $(DEFAULT_MODES) |
| 259 | 266 |
| 260 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile | 267 # Special target for the buildbots to use. Depends on $(OUTDIR)/Makefile |
| 261 # having been created before. | 268 # having been created before. |
| 262 buildbot: | 269 buildbot: |
| 263 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ | 270 $(MAKE) -C "$(OUTDIR)" BUILDTYPE=$(BUILDTYPE) \ |
| 264 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)" | 271 builddir="$(abspath $(OUTDIR))/$(BUILDTYPE)" |
| 265 | 272 |
| 266 mips mips.release mips.debug: | 273 mips mips.release mips.debug: |
| 267 @echo "V8 does not support big-endian MIPS builds at the moment," \ | 274 @echo "V8 does not support big-endian MIPS builds at the moment," \ |
| 268 "please use little-endian builds (mipsel)." | 275 "please use little-endian builds (mipsel)." |
| 269 | 276 |
| 270 # Compile targets. MODES and ARCHES are convenience targets. | 277 # Compile targets. MODES and ARCHES are convenience targets. |
| 271 .SECONDEXPANSION: | 278 .SECONDEXPANSION: |
| 272 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) | 279 $(MODES): $(addsuffix .$$@,$(DEFAULT_ARCHES)) |
| 273 | 280 |
| 274 $(ARCHES): $(addprefix $$@.,$(MODES)) | 281 $(ARCHES): $(addprefix $$@.,$(DEFAULT_MODES)) |
| 275 | 282 |
| 276 # Defines how to build a particular target (e.g. ia32.release). | 283 # Defines how to build a particular target (e.g. ia32.release). |
| 277 $(BUILDS): $(OUTDIR)/Makefile.$$(basename $$@) | 284 $(BUILDS): $(OUTDIR)/Makefile.$$@ |
| 278 » @$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \ | 285 » @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ |
| 279 CXX="$(CXX)" LINK="$(LINK)" \ | 286 CXX="$(CXX)" LINK="$(LINK)" \ |
| 280 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ | 287 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ |
| 281 » python -c "print raw_input().capitalize()") \ | 288 » python -c "print \ |
| 289 » raw_input().replace('opt', '').capitalize()") \ |
| 282 builddir="$(shell pwd)/$(OUTDIR)/$@" | 290 builddir="$(shell pwd)/$(OUTDIR)/$@" |
| 283 | 291 |
| 284 native: $(OUTDIR)/Makefile.native | 292 native: $(OUTDIR)/Makefile.native |
| 285 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ | 293 @$(MAKE) -C "$(OUTDIR)" -f Makefile.native \ |
| 286 CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \ | 294 CXX="$(CXX)" LINK="$(LINK)" BUILDTYPE=Release \ |
| 287 builddir="$(shell pwd)/$(OUTDIR)/$@" | 295 builddir="$(shell pwd)/$(OUTDIR)/$@" |
| 288 | 296 |
| 289 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) | 297 $(ANDROID_ARCHES): $(addprefix $$@.,$(MODES)) |
| 290 | 298 |
| 291 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ | 299 $(ANDROID_BUILDS): $(GYPFILES) $(ENVFILE) build/android.gypi \ |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 --timeout=600 --nopresubmit --noi18n \ | 351 --timeout=600 --nopresubmit --noi18n \ |
| 344 --command-prefix="tools/nacl-run.py" | 352 --command-prefix="tools/nacl-run.py" |
| 345 | 353 |
| 346 $(addsuffix .check, $(NACL_ARCHES)): \ | 354 $(addsuffix .check, $(NACL_ARCHES)): \ |
| 347 $(addprefix $$(basename $$@).,$(MODES)).check | 355 $(addprefix $$(basename $$@).,$(MODES)).check |
| 348 | 356 |
| 349 native.check: native | 357 native.check: native |
| 350 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \ | 358 @tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR)/native \ |
| 351 --arch-and-mode=. $(TESTFLAGS) | 359 --arch-and-mode=. $(TESTFLAGS) |
| 352 | 360 |
| 361 FASTTESTMODES = ia32.release,x64.release,ia32.optdebug,x64.optdebug,arm.optdebug |
| 362 |
| 363 COMMA = , |
| 364 EMPTY = |
| 365 SPACE = $(EMPTY) $(EMPTY) |
| 366 quickcheck: $(subst $(COMMA),$(SPACE),$(FASTTESTMODES)) |
| 367 tools/run-tests.py $(TESTJOBS) --outdir=$(OUTDIR) \ |
| 368 --arch-and-mode=$(FASTTESTMODES) $(TESTFLAGS) --quickcheck |
| 369 qc: quickcheck |
| 370 |
| 353 # Clean targets. You can clean each architecture individually, or everything. | 371 # Clean targets. You can clean each architecture individually, or everything. |
| 354 $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)): | 372 $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)): |
| 355 » rm -f $(OUTDIR)/Makefile.$(basename $@) | 373 » rm -f $(OUTDIR)/Makefile.$(basename $@)* |
| 356 rm -rf $(OUTDIR)/$(basename $@).release | 374 rm -rf $(OUTDIR)/$(basename $@).release |
| 357 rm -rf $(OUTDIR)/$(basename $@).debug | 375 rm -rf $(OUTDIR)/$(basename $@).debug |
| 358 » find $(OUTDIR) -regex '.*\(host\|target\).$(basename $@)\.mk' -delete | 376 » rm -rf $(OUTDIR)/$(basename $@).optdebug |
| 377 » find $(OUTDIR) -regex '.*\(host\|target\)\.$(basename $@).*\.mk' -delete |
| 359 | 378 |
| 360 native.clean: | 379 native.clean: |
| 361 rm -f $(OUTDIR)/Makefile.native | 380 rm -f $(OUTDIR)/Makefile.native |
| 362 rm -rf $(OUTDIR)/native | 381 rm -rf $(OUTDIR)/native |
| 363 » find $(OUTDIR) -regex '.*\(host\|target\).native\.mk' -delete | 382 » find $(OUTDIR) -regex '.*\(host\|target\)\.native\.mk' -delete |
| 364 | 383 |
| 365 clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.cl
ean | 384 clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES) $(NACL_ARCHES)) native.cl
ean |
| 366 | 385 |
| 367 # GYP file generation targets. | 386 # GYP file generation targets. |
| 368 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ARCHES)) | 387 OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(BUILDS)) |
| 369 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) | 388 $(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE) |
| 370 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ | 389 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ |
| 371 GYP_GENERATORS=make \ | 390 GYP_GENERATORS=make \ |
| 372 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ | 391 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ |
| 373 -Ibuild/standalone.gypi --depth=. \ | 392 -Ibuild/standalone.gypi --depth=. \ |
| 374 » -Dv8_target_arch=$(subst .,,$(suffix $@)) \ | 393 » -Dv8_target_arch=$(subst .,,$(suffix $(basename $@))) \ |
| 375 » -S.$(subst .,,$(suffix $@)) $(GYPFLAGS) | 394 » -Dv8_optimized_debug=$(if $(findstring optdebug,$@),2,0) \ |
| 395 » -S$(suffix $(basename $@))$(suffix $@) $(GYPFLAGS) |
| 376 | 396 |
| 377 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) | 397 $(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE) |
| 378 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ | 398 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ |
| 379 GYP_GENERATORS=make \ | 399 GYP_GENERATORS=make \ |
| 380 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ | 400 build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \ |
| 381 -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) | 401 -Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS) |
| 382 | 402 |
| 383 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN: | 403 must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN: |
| 384 ifndef ANDROID_NDK_ROOT | 404 ifndef ANDROID_NDK_ROOT |
| 385 ifndef ANDROID_TOOLCHAIN | 405 ifndef ANDROID_TOOLCHAIN |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE) | 438 @$(OUTDIR)/ia32.release/d8 --dump-heap-constants >> $(DUMP_FILE) |
| 419 | 439 |
| 420 # Dependencies. | 440 # Dependencies. |
| 421 # Remember to keep these in sync with the DEPS file. | 441 # Remember to keep these in sync with the DEPS file. |
| 422 dependencies: | 442 dependencies: |
| 423 svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \ | 443 svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \ |
| 424 --revision 1685 | 444 --revision 1685 |
| 425 svn checkout --force \ | 445 svn checkout --force \ |
| 426 https://src.chromium.org/chrome/trunk/deps/third_party/icu46 \ | 446 https://src.chromium.org/chrome/trunk/deps/third_party/icu46 \ |
| 427 third_party/icu --revision 214189 | 447 third_party/icu --revision 214189 |
| OLD | NEW |