1LOCAL_PATH:= $(call my-dir) 2include $(CLEAR_VARS) 3 4LOCAL_MODULE := d8 5LOCAL_MODULE_CLASS := EXECUTABLES 6 7generated_sources := $(call local-generated-sources-dir) 8 9LOCAL_CXX_STL := libc++ 10 11LOCAL_SRC_FILES := \ 12 src/d8.cc \ 13 src/d8-debug.cc \ 14 src/d8-posix.cc 15 16LOCAL_JS_D8_FILES := \ 17 $(LOCAL_PATH)/src/d8.js \ 18 $(LOCAL_PATH)/src/macros.py 19 20# Copy js2c.py to generated sources directory and invoke there to avoid 21# generating jsmin.pyc in the source directory 22JS2C_PY := $(generated_sources)/js2c.py $(generated_sources)/jsmin.py 23$(JS2C_PY): $(generated_sources)/%.py : $(LOCAL_PATH)/tools/%.py | $(ACP) 24 @echo "Copying $@" 25 $(copy-file-to-target) 26 27# Generate d8-js.cc 28D8_GEN := $(generated_sources)/d8-js.cc 29$(D8_GEN): SCRIPT := $(generated_sources)/js2c.py 30$(D8_GEN): $(LOCAL_JS_D8_FILES) $(JS2C_PY) 31 @echo "Generating d8-js.cc" 32 @mkdir -p $(dir $@) 33 python $(SCRIPT) $@ D8 off $(LOCAL_JS_D8_FILES) 34LOCAL_GENERATED_SOURCES += $(D8_GEN) 35 36LOCAL_CPP_EXTENSION := .cc 37 38LOCAL_STATIC_LIBRARIES := libv8 39LOCAL_SHARED_LIBRARIES += liblog libicuuc libicui18n 40 41LOCAL_MODULE_TAGS := optional 42 43LOCAL_CFLAGS := \ 44 -Wno-unused-parameter \ 45 -std=gnu++0x 46 47LOCAL_MODULE_TARGET_ARCH_WARN := $(V8_SUPPORTED_ARCH) 48 49include $(BUILD_EXECUTABLE) 50