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