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-posix.cc 14 15LOCAL_JS_D8_FILES := \ 16 $(LOCAL_PATH)/src/d8.js \ 17 $(LOCAL_PATH)/src/js/macros.py 18 19# Copy js2c.py to generated sources directory and invoke there to avoid 20# generating jsmin.pyc in the source directory 21JS2C_PY := $(generated_sources)/js2c.py $(generated_sources)/jsmin.py 22$(JS2C_PY): $(generated_sources)/%.py : $(LOCAL_PATH)/tools/%.py | $(ACP) 23 @echo "Copying $@" 24 $(copy-file-to-target) 25 26# Generate d8-js.cc 27D8_GEN := $(generated_sources)/d8-js.cc 28$(D8_GEN): SCRIPT := $(generated_sources)/js2c.py 29$(D8_GEN): $(LOCAL_JS_D8_FILES) $(JS2C_PY) 30 @echo "Generating d8-js.cc" 31 @mkdir -p $(dir $@) 32 python $(SCRIPT) $@ D8 $(LOCAL_JS_D8_FILES) 33LOCAL_GENERATED_SOURCES += $(D8_GEN) 34 35LOCAL_CPP_EXTENSION := .cc 36 37LOCAL_STATIC_LIBRARIES := libv8 38LOCAL_SHARED_LIBRARIES += liblog libicuuc libicui18n 39 40LOCAL_MODULE_TAGS := optional 41 42LOCAL_CFLAGS := \ 43 -DV8_I18N_SUPPORT \ 44 -Wno-unused-parameter \ 45 -std=gnu++0x \ 46 -O0 47 48LOCAL_MODULE_TARGET_ARCH_WARN := $(V8_SUPPORTED_ARCH) 49 50include $(BUILD_EXECUTABLE) 51