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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 else | 52 else |
53 ifeq ($(ARCH), android_ia32) | 53 ifeq ($(ARCH), android_ia32) |
54 DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86 | 54 DEFINES = target_arch=ia32 v8_target_arch=ia32 android_target_arch=x86 |
55 TOOLCHAIN_ARCH = x86-4.4.3 | 55 TOOLCHAIN_ARCH = x86-4.4.3 |
56 else | 56 else |
57 $(error Target architecture "${ARCH}" is not supported) | 57 $(error Target architecture "${ARCH}" is not supported) |
58 endif | 58 endif |
59 endif | 59 endif |
60 | 60 |
61 TOOLCHAIN_PATH = ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}/prebuilt | 61 TOOLCHAIN_PATH = ${ANDROID_NDK_ROOT}/toolchains/${TOOLCHAIN_ARCH}/prebuilt |
62 ANDROID_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR}/bin | 62 ANDROID_TOOLCHAIN ?= ${TOOLCHAIN_PATH}/${TOOLCHAIN_DIR} |
63 ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),) | 63 ifeq ($(wildcard $(ANDROID_TOOLCHAIN)),) |
64 $(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}") | 64 $(error Cannot find Android toolchain in "${ANDROID_TOOLCHAIN}") |
65 endif | 65 endif |
66 | 66 |
67 # For mksnapshot host generation. | 67 # For mksnapshot host generation. |
68 DEFINES += host_os=${HOST_OS} | 68 DEFINES += host_os=${HOST_OS} |
69 | 69 |
70 .SECONDEXPANSION: | 70 .SECONDEXPANSION: |
71 $(ANDROID_BUILDS): $(OUTDIR)/Makefile.$$(basename $$@) | 71 $(ANDROID_BUILDS): $(OUTDIR)/Makefile.$$(basename $$@) |
72 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \ | 72 @$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \ |
73 » CXX="$(ANDROID_TOOLCHAIN)/*-g++" \ | 73 » CXX="$(ANDROID_TOOLCHAIN)/bin/*-g++" \ |
74 » AR="$(ANDROID_TOOLCHAIN)/*-ar" \ | 74 » AR="$(ANDROID_TOOLCHAIN)/bin/*-ar" \ |
75 » RANLIB="$(ANDROID_TOOLCHAIN)/*-ranlib" \ | 75 » RANLIB="$(ANDROID_TOOLCHAIN)/bin/*-ranlib" \ |
76 » CC="$(ANDROID_TOOLCHAIN)/*-gcc" \ | 76 » CC="$(ANDROID_TOOLCHAIN)/bin/*-gcc" \ |
77 » LD="$(ANDROID_TOOLCHAIN)/*-ld" \ | 77 » LD="$(ANDROID_TOOLCHAIN)/bin/*-ld" \ |
78 » LINK="$(ANDROID_TOOLCHAIN)/*-g++" \ | 78 » LINK="$(ANDROID_TOOLCHAIN)/bin/*-g++" \ |
79 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ | 79 BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \ |
80 python -c "print raw_input().capitalize()") \ | 80 python -c "print raw_input().capitalize()") \ |
81 builddir="$(shell pwd)/$(OUTDIR)/$@" | 81 builddir="$(shell pwd)/$(OUTDIR)/$@" |
82 | 82 |
83 # Android GYP file generation targets. | 83 # Android GYP file generation targets. |
84 ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_ARCHES)) | 84 ANDROID_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ANDROID_ARCHES)) |
85 $(ANDROID_MAKEFILES): | 85 $(ANDROID_MAKEFILES): |
86 @GYP_GENERATORS=make-android \ | 86 @GYP_GENERATORS=make-android \ |
87 GYP_DEFINES="${DEFINES}" \ | 87 GYP_DEFINES="${DEFINES}" \ |
88 » CC="${ANDROID_TOOLCHAIN}/*-gcc" \ | 88 » CC="${ANDROID_TOOLCHAIN}/bin/*-gcc" \ |
89 » CXX="${ANDROID_TOOLCHAIN}/*-g++" \ | 89 » CXX="${ANDROID_TOOLCHAIN}/bin/*-g++" \ |
90 build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ | 90 build/gyp/gyp --generator-output="${OUTDIR}" build/all.gyp \ |
91 -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \ | 91 -Ibuild/standalone.gypi --depth=. -Ibuild/android.gypi \ |
92 -S.${ARCH} ${GYPFLAGS} | 92 -S.${ARCH} ${GYPFLAGS} |
OLD | NEW |