Home | History | Annotate | Download | only in v8
      1 LOCAL_PATH:= $(call my-dir)
      2 include $(CLEAR_VARS)
      3 
      4 LOCAL_MODULE := d8
      5 LOCAL_MODULE_CLASS := EXECUTABLES
      6 
      7 generated_sources := $(call local-generated-sources-dir)
      8 
      9 LOCAL_CXX_STL := libc++
     10 
     11 LOCAL_SRC_FILES := \
     12     src/d8.cc \
     13     src/d8-posix.cc
     14 
     15 LOCAL_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
     21 JS2C_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
     27 D8_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)
     33 LOCAL_GENERATED_SOURCES += $(D8_GEN)
     34 
     35 LOCAL_CPP_EXTENSION := .cc
     36 
     37 LOCAL_STATIC_LIBRARIES := libv8
     38 LOCAL_SHARED_LIBRARIES += liblog libicuuc libicui18n
     39 
     40 LOCAL_MODULE_TAGS := optional
     41 
     42 LOCAL_CFLAGS := \
     43 	-DV8_I18N_SUPPORT \
     44 	-Wno-unused-parameter \
     45 	-std=gnu++0x \
     46 	-O0
     47 
     48 LOCAL_MODULE_TARGET_ARCH_WARN := $(V8_SUPPORTED_ARCH)
     49 
     50 include $(BUILD_EXECUTABLE)
     51