Carl Shapiro | 105a9d2 | 2010-04-13 17:53:26 -0700 | [diff] [blame] | 1 | ifneq ($(TARGET_SIMULATOR),true) |
| 2 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 3 | LOCAL_PATH := $(call my-dir) |
Shih-wei Liao | 210a1ef | 2010-09-07 17:06:38 -0700 | [diff] [blame^] | 4 | LLVM_ROOT_PATH := external/llvm |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 5 | |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 6 | USE_DISASSEMBLER := true |
| 7 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 8 | # Shared library for target |
| 9 | # ======================================================== |
| 10 | include $(CLEAR_VARS) |
| 11 | LOCAL_PRELINK_MODULE := false |
| 12 | LOCAL_MODULE := libbcc |
| 13 | LOCAL_SRC_FILES := \ |
| 14 | bcc.cpp \ |
| 15 | bcc_runtime.c \ |
| 16 | runtime/lib/arm/adddf3vfp.S \ |
| 17 | runtime/lib/arm/addsf3vfp.S \ |
| 18 | runtime/lib/arm/divdf3vfp.S \ |
| 19 | runtime/lib/arm/divsf3vfp.S \ |
| 20 | runtime/lib/arm/eqdf2vfp.S \ |
| 21 | runtime/lib/arm/eqsf2vfp.S \ |
| 22 | runtime/lib/arm/extendsfdf2vfp.S \ |
| 23 | runtime/lib/arm/fixdfsivfp.S \ |
| 24 | runtime/lib/arm/fixsfsivfp.S \ |
| 25 | runtime/lib/arm/fixunsdfsivfp.S \ |
| 26 | runtime/lib/arm/fixunssfsivfp.S \ |
| 27 | runtime/lib/arm/floatsidfvfp.S \ |
| 28 | runtime/lib/arm/floatsisfvfp.S \ |
| 29 | runtime/lib/arm/floatunssidfvfp.S \ |
| 30 | runtime/lib/arm/floatunssisfvfp.S \ |
| 31 | runtime/lib/arm/gedf2vfp.S \ |
| 32 | runtime/lib/arm/gesf2vfp.S \ |
| 33 | runtime/lib/arm/gtdf2vfp.S \ |
| 34 | runtime/lib/arm/gtsf2vfp.S \ |
| 35 | runtime/lib/arm/ledf2vfp.S \ |
| 36 | runtime/lib/arm/lesf2vfp.S \ |
| 37 | runtime/lib/arm/ltdf2vfp.S \ |
| 38 | runtime/lib/arm/ltsf2vfp.S \ |
| 39 | runtime/lib/arm/muldf3vfp.S \ |
| 40 | runtime/lib/arm/mulsf3vfp.S \ |
| 41 | runtime/lib/arm/nedf2vfp.S \ |
| 42 | runtime/lib/arm/negdf2vfp.S \ |
| 43 | runtime/lib/arm/negsf2vfp.S \ |
| 44 | runtime/lib/arm/nesf2vfp.S \ |
| 45 | runtime/lib/arm/subdf3vfp.S \ |
| 46 | runtime/lib/arm/subsf3vfp.S \ |
| 47 | runtime/lib/arm/truncdfsf2vfp.S \ |
| 48 | runtime/lib/arm/unorddf2vfp.S \ |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 49 | runtime/lib/arm/unordsf2vfp.S |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 50 | |
| 51 | LOCAL_STATIC_LIBRARIES := \ |
| 52 | libLLVMARMCodeGen \ |
| 53 | libLLVMARMInfo \ |
| 54 | libLLVMBitReader \ |
| 55 | libLLVMSelectionDAG \ |
| 56 | libLLVMAsmPrinter \ |
| 57 | libLLVMCodeGen \ |
| 58 | libLLVMJIT \ |
| 59 | libLLVMTarget \ |
| 60 | libLLVMMC \ |
| 61 | libLLVMScalarOpts \ |
| 62 | libLLVMTransformUtils \ |
| 63 | libLLVMCore \ |
| 64 | libLLVMSupport \ |
| 65 | libLLVMSystem \ |
| 66 | libLLVMAnalysis |
| 67 | |
| 68 | LOCAL_SHARED_LIBRARIES := libdl libcutils libstlport |
| 69 | |
| 70 | LOCAL_C_INCLUDES := \ |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 71 | $(LOCAL_PATH)/include |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 72 | |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 73 | ifeq ($(USE_DISASSEMBLER),true) |
| 74 | LOCAL_CFLAGS += -DUSE_DISASSEMBLER |
| 75 | LOCAL_STATIC_LIBRARIES := \ |
| 76 | libLLVMARMDisassembler \ |
| 77 | libLLVMARMAsmPrinter \ |
| 78 | libLLVMMCParser \ |
| 79 | $(LOCAL_STATIC_LIBRARIES) |
| 80 | endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 81 | |
Doug Kwan | 75dacc1 | 2010-07-20 16:54:58 -0700 | [diff] [blame] | 82 | # This hides most of the symbols in the shared library and reduces the size |
| 83 | # of libbcc.so by about 800k. |
| 84 | LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL |
| 85 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 86 | include $(LLVM_ROOT_PATH)/llvm-device-build.mk |
| 87 | include $(BUILD_SHARED_LIBRARY) |
| 88 | |
| 89 | # Shared library for host |
| 90 | # ======================================================== |
| 91 | include $(CLEAR_VARS) |
| 92 | |
| 93 | LOCAL_MODULE := libbcc |
| 94 | LOCAL_SRC_FILES := bcc.cpp bcc_runtime.c |
| 95 | |
| 96 | LOCAL_STATIC_LIBRARIES := \ |
| 97 | libcutils \ |
| 98 | libLLVMX86CodeGen \ |
| 99 | libLLVMX86Info \ |
| 100 | libLLVMBitReader \ |
| 101 | libLLVMSelectionDAG \ |
| 102 | libLLVMAsmPrinter \ |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 103 | libLLVMMCParser \ |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 104 | libLLVMCodeGen \ |
| 105 | libLLVMJIT \ |
| 106 | libLLVMTarget \ |
| 107 | libLLVMMC \ |
| 108 | libLLVMScalarOpts \ |
| 109 | libLLVMTransformUtils \ |
| 110 | libLLVMCore \ |
| 111 | libLLVMSupport \ |
| 112 | libLLVMSystem \ |
| 113 | libLLVMAnalysis |
| 114 | |
| 115 | LOCAL_LDLIBS := -ldl -lpthread |
| 116 | |
| 117 | LOCAL_C_INCLUDES := \ |
| 118 | $(LOCAL_PATH)/include |
| 119 | |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 120 | ifeq ($(USE_DISASSEMBLER),true) |
| 121 | LOCAL_CFLAGS += -DUSE_DISASSEMBLER |
| 122 | LOCAL_STATIC_LIBRARIES := \ |
| 123 | libLLVMX86Disassembler \ |
| 124 | libLLVMX86AsmPrinter \ |
| 125 | $(LOCAL_STATIC_LIBRARIES) |
| 126 | endif |
| 127 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 128 | include $(LLVM_ROOT_PATH)/llvm-host-build.mk |
| 129 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 130 | |
| 131 | # Build children |
| 132 | # ======================================================== |
| 133 | |
| 134 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
Carl Shapiro | 105a9d2 | 2010-04-13 17:53:26 -0700 | [diff] [blame] | 135 | |
Shih-wei Liao | 800e9c2 | 2010-04-18 16:08:16 -0700 | [diff] [blame] | 136 | endif # TARGET_SIMULATOR != true |