1 LOCAL_PATH := $(call my-dir) 2 3 LLVM_ROOT_PATH := $(LOCAL_PATH)/../.. 4 5 #===---------------------------------------------------------------=== 6 # llvm-config command line tool 7 #===---------------------------------------------------------------=== 8 9 include $(CLEAR_VARS) 10 11 llvm_config_SRC_FILES := \ 12 llvm-config.cpp 13 14 llvm_config_STATIC_LIBRARIES := \ 15 libLLVMCore \ 16 libLLVMSupport 17 18 LOCAL_MODULE := llvm-config 19 LOCAL_MODULE_TAGS := optional 20 LOCAL_MODULE_CLASS := EXECUTABLES 21 LOCAL_IS_HOST_MODULE := true 22 23 # Create BuildVariables.inc dynamically from BuildVariables.inc.in 24 generated_sources := $(call local-generated-sources-dir) 25 GEN := $(addprefix $(generated_sources)/, \ 26 BuildVariables.inc \ 27 ) 28 29 $(GEN) : PRIVATE_PATH := $(LOCAL_PATH) 30 $(GEN) : PRIVATE_CUSTOM_TOOL = sed -e 's/@ANDROID_BUILD_TOP@/$(subst /,\/,$(ANDROID_BUILD_TOP))/' < $< > $@ 31 $(GEN) : $(LOCAL_PATH)/BuildVariables.inc.in 32 $(GEN): $(generated_sources)/%.inc : $(LOCAL_PATH)/%.inc.in 33 $(transform-generated-source) 34 35 LOCAL_GENERATED_SOURCES += $(GEN) 36 37 LOCAL_C_INCLUDES := $(generated_sources) 38 39 LOCAL_SRC_FILES := $(llvm_config_SRC_FILES) 40 LOCAL_STATIC_LIBRARIES := $(llvm_config_STATIC_LIBRARIES) 41 42 LOCAL_LDLIBS += -lpthread -lm -ldl 43 LOCAL_ADDITIONAL_DEPENDENCIES := \ 44 $(LOCAL_PATH)/Android.mk \ 45 $(LOCAL_GENERATED_SOURCES) 46 47 include $(LLVM_ROOT_PATH)/llvm.mk 48 include $(LLVM_HOST_BUILD_MK) 49 include $(BUILD_HOST_EXECUTABLE) 50