Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2010 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
Carl Shapiro | 105a9d2 | 2010-04-13 17:53:26 -0700 | [diff] [blame] | 17 | ifneq ($(TARGET_SIMULATOR),true) |
| 18 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 19 | LOCAL_PATH := $(call my-dir) |
Shih-wei Liao | 210a1ef | 2010-09-07 17:06:38 -0700 | [diff] [blame] | 20 | LLVM_ROOT_PATH := external/llvm |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 21 | |
Logan | eac346d | 2010-11-24 22:32:34 +0800 | [diff] [blame^] | 22 | USE_CACHE := true |
Shih-wei Liao | bc5ed67 | 2010-11-24 01:53:02 -0800 | [diff] [blame] | 23 | USE_RELOCATE := false |
| 24 | |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 25 | USE_DISASSEMBLER := true |
Ying Wang | 2c06c3e | 2010-09-07 21:24:55 -0700 | [diff] [blame] | 26 | LLVM_ENABLE_ASSERTION := false |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 27 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 28 | # Shared library for target |
| 29 | # ======================================================== |
| 30 | include $(CLEAR_VARS) |
| 31 | LOCAL_PRELINK_MODULE := false |
| 32 | LOCAL_MODULE := libbcc |
Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 33 | LOCAL_MODULE_TAGS := optional |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 34 | LOCAL_SRC_FILES := \ |
| 35 | bcc.cpp \ |
| 36 | bcc_runtime.c \ |
| 37 | runtime/lib/arm/adddf3vfp.S \ |
| 38 | runtime/lib/arm/addsf3vfp.S \ |
| 39 | runtime/lib/arm/divdf3vfp.S \ |
| 40 | runtime/lib/arm/divsf3vfp.S \ |
| 41 | runtime/lib/arm/eqdf2vfp.S \ |
| 42 | runtime/lib/arm/eqsf2vfp.S \ |
| 43 | runtime/lib/arm/extendsfdf2vfp.S \ |
| 44 | runtime/lib/arm/fixdfsivfp.S \ |
| 45 | runtime/lib/arm/fixsfsivfp.S \ |
| 46 | runtime/lib/arm/fixunsdfsivfp.S \ |
| 47 | runtime/lib/arm/fixunssfsivfp.S \ |
| 48 | runtime/lib/arm/floatsidfvfp.S \ |
| 49 | runtime/lib/arm/floatsisfvfp.S \ |
| 50 | runtime/lib/arm/floatunssidfvfp.S \ |
| 51 | runtime/lib/arm/floatunssisfvfp.S \ |
| 52 | runtime/lib/arm/gedf2vfp.S \ |
| 53 | runtime/lib/arm/gesf2vfp.S \ |
| 54 | runtime/lib/arm/gtdf2vfp.S \ |
| 55 | runtime/lib/arm/gtsf2vfp.S \ |
| 56 | runtime/lib/arm/ledf2vfp.S \ |
| 57 | runtime/lib/arm/lesf2vfp.S \ |
| 58 | runtime/lib/arm/ltdf2vfp.S \ |
| 59 | runtime/lib/arm/ltsf2vfp.S \ |
| 60 | runtime/lib/arm/muldf3vfp.S \ |
| 61 | runtime/lib/arm/mulsf3vfp.S \ |
| 62 | runtime/lib/arm/nedf2vfp.S \ |
| 63 | runtime/lib/arm/negdf2vfp.S \ |
| 64 | runtime/lib/arm/negsf2vfp.S \ |
| 65 | runtime/lib/arm/nesf2vfp.S \ |
| 66 | runtime/lib/arm/subdf3vfp.S \ |
| 67 | runtime/lib/arm/subsf3vfp.S \ |
| 68 | runtime/lib/arm/truncdfsf2vfp.S \ |
| 69 | runtime/lib/arm/unorddf2vfp.S \ |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 70 | runtime/lib/arm/unordsf2vfp.S |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 71 | |
| 72 | LOCAL_STATIC_LIBRARIES := \ |
| 73 | libLLVMARMCodeGen \ |
| 74 | libLLVMARMInfo \ |
| 75 | libLLVMBitReader \ |
| 76 | libLLVMSelectionDAG \ |
| 77 | libLLVMAsmPrinter \ |
| 78 | libLLVMCodeGen \ |
Zonr Chang | 97f5e61 | 2010-10-22 20:38:26 +0800 | [diff] [blame] | 79 | libLLVMLinker \ |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 80 | libLLVMJIT \ |
| 81 | libLLVMTarget \ |
| 82 | libLLVMMC \ |
| 83 | libLLVMScalarOpts \ |
Zonr Chang | 6e1d6c3 | 2010-10-23 11:57:16 +0800 | [diff] [blame] | 84 | libLLVMInstCombine \ |
| 85 | libLLVMipo \ |
| 86 | libLLVMipa \ |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 87 | libLLVMTransformUtils \ |
| 88 | libLLVMCore \ |
| 89 | libLLVMSupport \ |
| 90 | libLLVMSystem \ |
| 91 | libLLVMAnalysis |
| 92 | |
Shih-wei Liao | 7c5a5f7 | 2010-11-08 01:59:13 -0800 | [diff] [blame] | 93 | LOCAL_SHARED_LIBRARIES := libdl libcutils libutils libstlport |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 94 | |
| 95 | LOCAL_C_INCLUDES := \ |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 96 | $(LOCAL_PATH)/include |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 97 | |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 98 | ifeq ($(USE_DISASSEMBLER),true) |
| 99 | LOCAL_CFLAGS += -DUSE_DISASSEMBLER |
| 100 | LOCAL_STATIC_LIBRARIES := \ |
| 101 | libLLVMARMDisassembler \ |
| 102 | libLLVMARMAsmPrinter \ |
| 103 | libLLVMMCParser \ |
| 104 | $(LOCAL_STATIC_LIBRARIES) |
| 105 | endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 106 | |
Doug Kwan | 75dacc1 | 2010-07-20 16:54:58 -0700 | [diff] [blame] | 107 | # This hides most of the symbols in the shared library and reduces the size |
| 108 | # of libbcc.so by about 800k. |
| 109 | LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL |
| 110 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 111 | include $(LLVM_ROOT_PATH)/llvm-device-build.mk |
| 112 | include $(BUILD_SHARED_LIBRARY) |
| 113 | |
| 114 | # Shared library for host |
| 115 | # ======================================================== |
| 116 | include $(CLEAR_VARS) |
| 117 | |
| 118 | LOCAL_MODULE := libbcc |
Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 119 | LOCAL_MODULE_TAGS := optional |
Shih-wei Liao | e64c287 | 2010-10-25 13:44:53 -0700 | [diff] [blame] | 120 | LOCAL_SRC_FILES := \ |
| 121 | bcc.cpp \ |
| 122 | hashmap.c \ |
| 123 | logd_write.c \ |
| 124 | bcc_runtime.c |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 125 | |
| 126 | LOCAL_STATIC_LIBRARIES := \ |
| 127 | libcutils \ |
| 128 | libLLVMX86CodeGen \ |
| 129 | libLLVMX86Info \ |
Shih-wei Liao | e64c287 | 2010-10-25 13:44:53 -0700 | [diff] [blame] | 130 | libLLVMARMCodeGen \ |
| 131 | libLLVMARMInfo \ |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 132 | libLLVMBitReader \ |
| 133 | libLLVMSelectionDAG \ |
| 134 | libLLVMAsmPrinter \ |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 135 | libLLVMMCParser \ |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 136 | libLLVMCodeGen \ |
Zonr Chang | 97f5e61 | 2010-10-22 20:38:26 +0800 | [diff] [blame] | 137 | libLLVMLinker \ |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 138 | libLLVMJIT \ |
| 139 | libLLVMTarget \ |
| 140 | libLLVMMC \ |
| 141 | libLLVMScalarOpts \ |
Zonr Chang | 6e1d6c3 | 2010-10-23 11:57:16 +0800 | [diff] [blame] | 142 | libLLVMInstCombine \ |
| 143 | libLLVMipo \ |
| 144 | libLLVMipa \ |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 145 | libLLVMTransformUtils \ |
| 146 | libLLVMCore \ |
| 147 | libLLVMSupport \ |
| 148 | libLLVMSystem \ |
| 149 | libLLVMAnalysis |
| 150 | |
| 151 | LOCAL_LDLIBS := -ldl -lpthread |
| 152 | |
| 153 | LOCAL_C_INCLUDES := \ |
| 154 | $(LOCAL_PATH)/include |
| 155 | |
Shih-wei Liao | e64c287 | 2010-10-25 13:44:53 -0700 | [diff] [blame] | 156 | # definitions for LLVM |
Shih-wei Liao | 7c5a5f7 | 2010-11-08 01:59:13 -0800 | [diff] [blame] | 157 | LOCAL_CFLAGS += -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DUSE_DISASSEMBLER=1 -DFORCE_ARM_CODEGEN=1 -DDEBUG_CODEGEN=1 |
Shih-wei Liao | e64c287 | 2010-10-25 13:44:53 -0700 | [diff] [blame] | 158 | |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 159 | ifeq ($(USE_DISASSEMBLER),true) |
| 160 | LOCAL_CFLAGS += -DUSE_DISASSEMBLER |
| 161 | LOCAL_STATIC_LIBRARIES := \ |
Shih-wei Liao | e64c287 | 2010-10-25 13:44:53 -0700 | [diff] [blame] | 162 | libLLVMARMDisassembler \ |
| 163 | libLLVMARMAsmPrinter \ |
| 164 | libLLVMMCParser \ |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 165 | $(LOCAL_STATIC_LIBRARIES) |
| 166 | endif |
| 167 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 168 | include $(LLVM_ROOT_PATH)/llvm-host-build.mk |
| 169 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 170 | |
| 171 | # Build children |
| 172 | # ======================================================== |
| 173 | |
| 174 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
Carl Shapiro | 105a9d2 | 2010-04-13 17:53:26 -0700 | [diff] [blame] | 175 | |
Shih-wei Liao | 800e9c2 | 2010-04-18 16:08:16 -0700 | [diff] [blame] | 176 | endif # TARGET_SIMULATOR != true |