| 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 30 matching lines...) Expand all Loading... |
| 41 else | 41 else |
| 42 ifeq ($(HOST_OS), mac) | 42 ifeq ($(HOST_OS), mac) |
| 43 TOOLCHAIN_DIR = darwin-$(ANDROID_NDK_HOST_ARCH) | 43 TOOLCHAIN_DIR = darwin-$(ANDROID_NDK_HOST_ARCH) |
| 44 else | 44 else |
| 45 $(error Host platform "${HOST_OS}" is not supported) | 45 $(error Host platform "${HOST_OS}" is not supported) |
| 46 endif | 46 endif |
| 47 endif | 47 endif |
| 48 | 48 |
| 49 ifeq ($(ARCH), android_arm) | 49 ifeq ($(ARCH), android_arm) |
| 50 DEFINES = target_arch=arm v8_target_arch=arm android_target_arch=arm | 50 DEFINES = target_arch=arm v8_target_arch=arm android_target_arch=arm |
| 51 DEFINES += arm_neon=0 armv7=1 | 51 DEFINES += arm_neon=0 arm_version=7 |
| 52 TOOLCHAIN_ARCH = arm-linux-androideabi-4.6 | 52 TOOLCHAIN_ARCH = arm-linux-androideabi-4.6 |
| 53 else | 53 else |
| 54 ifeq ($(ARCH), android_a64) | 54 ifeq ($(ARCH), android_a64) |
| 55 DEFINES = target_arch=a64 v8_target_arch=a64 android_target_arch=aarch64 | 55 DEFINES = target_arch=a64 v8_target_arch=a64 android_target_arch=aarch64 |
| 56 TOOLCHAIN_ARCH = aarch64-linux-android-4.8 | 56 TOOLCHAIN_ARCH = aarch64-linux-android-4.8 |
| 57 else | 57 else |
| 58 ifeq ($(ARCH), android_mipsel) | 58 ifeq ($(ARCH), android_mipsel) |
| 59 DEFINES = target_arch=mipsel v8_target_arch=mipsel | 59 DEFINES = target_arch=mipsel v8_target_arch=mipsel |
| 60 DEFINES += android_target_arch=mips mips_arch_variant=mips32r2 | 60 DEFINES += android_target_arch=mips mips_arch_variant=mips32r2 |
| 61 TOOLCHAIN_ARCH = mipsel-linux-android-4.6 | 61 TOOLCHAIN_ARCH = mipsel-linux-android-4.6 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 75 ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),) | 75 ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),) |
| 76 $(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}". Please \ | 76 $(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}". Please \ |
| 77 check that ANDROID_NDK_ROOT and ANDROID_NDK_HOST_ARCH are set \ | 77 check that ANDROID_NDK_ROOT and ANDROID_NDK_HOST_ARCH are set \ |
| 78 correctly) | 78 correctly) |
| 79 endif | 79 endif |
| 80 | 80 |
| 81 # For mksnapshot host generation. | 81 # For mksnapshot host generation. |
| 82 DEFINES += host_os=${HOST_OS} | 82 DEFINES += host_os=${HOST_OS} |
| 83 | 83 |
| 84 .SECONDEXPANSION: | 84 .SECONDEXPANSION: |
| 85 $(ANDROID_BUILDS): $(OUTDIR)/Makefile.$$(basename $$@) | 85 $(ANDROID_BUILDS): $(OUTDIR)/Makefile.$$@ |
| 86 » @$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \ | 86 » @$(MAKE) -C "$(OUTDIR)" -f Makefile.$@ \ |
| 87 CXX="$(ANDROID_TOOLCHAIN)/bin/*-g++" \ | 87 CXX="$(ANDROID_TOOLCHAIN)/bin/*-g++" \ |
| 88 AR="$(ANDROID_TOOLCHAIN)/bin/*-ar" \ | 88 AR="$(ANDROID_TOOLCHAIN)/bin/*-ar" \ |
| 89 RANLIB="$(ANDROID_TOOLCHAIN)/bin/*-ranlib" \ | 89 RANLIB="$(ANDROID_TOOLCHAIN)/bin/*-ranlib" \ |
| 90 CC="$(ANDROID_TOOLCHAIN)/bin/*-gcc" \ | 90 CC="$(ANDROID_TOOLCHAIN)/bin/*-gcc" \ |
| 91 LD="$(ANDROID_TOOLCHAIN)/bin/*-ld" \ | 91 LD="$(ANDROID_TOOLCHAIN)/bin/*-ld" \ |
| 92 LINK="$(ANDROID_TOOLCHAIN)/bin/*-g++" \ | 92 LINK="$(ANDROID_TOOLCHAIN)/bin/*-g++" \ |
| 93 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ | 93 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ |
| 94 python -c "print raw_input().capitalize()") \ | 94 python -c "print raw_input().capitalize()") \ |
| 95 builddir="$(shell pwd)/$(OUTDIR)/$@" | 95 builddir="$(shell pwd)/$(OUTDIR)/$@" |
| 96 | 96 |
| 97 # Android GYP file generation targets. | 97 # Android GYP file generation targets. |
| 98 ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_ARCHES)) | 98 ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_BUILDS)) |
| 99 $(ANDROID_MAKEFILES): | 99 $(ANDROID_MAKEFILES): |
| 100 » @GYP_GENERATORS=make-android \ | 100 » GYP_GENERATORS=make-android \ |
| 101 GYP_DEFINES="${DEFINES}" \ | 101 GYP_DEFINES="${DEFINES}" \ |
| 102 CC="${ANDROID_TOOLCHAIN}/bin/*-gcc" \ | 102 CC="${ANDROID_TOOLCHAIN}/bin/*-gcc" \ |
| 103 CXX="${ANDROID_TOOLCHAIN}/bin/*-g++" \ | 103 CXX="${ANDROID_TOOLCHAIN}/bin/*-g++" \ |
| 104 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ | 104 PYTHONPATH="$(shell pwd)/tools/generate_shim_headers:$(PYTHONPATH)" \ |
| 105 build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ | 105 build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ |
| 106 -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \ | 106 -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \ |
| 107 » -S.${ARCH} ${GYPFLAGS} | 107 » -S$(suffix $(basename $@))$(suffix $@) ${GYPFLAGS} |
| OLD | NEW |