1LOCAL_PATH:= $(call my-dir) 2include $(CLEAR_VARS) 3 4include $(LOCAL_PATH)/Android.v8common.mk 5 6LOCAL_MODULE := d8 7LOCAL_MODULE_CLASS := EXECUTABLES 8 9LOCAL_SRC_FILES := \ 10 src/d8.cc \ 11 src/d8-posix.cc 12 13LOCAL_JS_D8_FILES := \ 14 $(LOCAL_PATH)/src/d8.js \ 15 $(LOCAL_PATH)/src/js/macros.py 16 17generated_sources := $(call local-generated-sources-dir) 18# Copy js2c.py to generated sources directory and invoke there to avoid 19# generating jsmin.pyc in the source directory 20JS2C_PY := $(generated_sources)/js2c.py $(generated_sources)/jsmin.py 21$(JS2C_PY): $(generated_sources)/%.py : $(LOCAL_PATH)/tools/%.py | $(ACP) 22 @echo "Copying $@" 23 $(copy-file-to-target) 24 25# Generate d8-js.cc 26D8_GEN := $(generated_sources)/d8-js.cc 27$(D8_GEN): SCRIPT := $(generated_sources)/js2c.py 28$(D8_GEN): $(LOCAL_JS_D8_FILES) $(JS2C_PY) 29 @echo "Generating d8-js.cc" 30 @mkdir -p $(dir $@) 31 python $(SCRIPT) $@ D8 $(LOCAL_JS_D8_FILES) 32LOCAL_GENERATED_SOURCES += $(D8_GEN) 33 34LOCAL_STATIC_LIBRARIES := libv8 35LOCAL_SHARED_LIBRARIES := liblog libicuuc libicui18n 36 37LOCAL_MODULE_TAGS := optional 38 39LOCAL_CFLAGS += \ 40 -O0 41 42LOCAL_C_INCLUDES := \ 43 $(LOCAL_PATH)/include 44 45# Bug: http://b/31101212 WAR LLVM bug until next Clang update 46LOCAL_CFLAGS_mips += -O2 47 48LOCAL_MODULE_TARGET_ARCH_WARN := $(V8_SUPPORTED_ARCH) 49 50include $(BUILD_EXECUTABLE) 51 52 53