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 | |
Logan | cf3e521 | 2010-12-29 01:44:55 +0800 | [diff] [blame] | 28 | libbcc_SRC_FILES := \ |
| 29 | lib/bcc/bcc.cpp \ |
| 30 | lib/bcc/CodeEmitter.cpp \ |
| 31 | lib/bcc/CodeMemoryManager.cpp \ |
| 32 | lib/bcc/Compiler.cpp \ |
| 33 | lib/bcc/ContextManager.cpp \ |
Logan | ef9e4f7 | 2011-01-06 03:18:12 +0800 | [diff] [blame^] | 34 | lib/bcc/FileHandle.cpp \ |
Logan | cf3e521 | 2010-12-29 01:44:55 +0800 | [diff] [blame] | 35 | lib/bcc/Runtime.c \ |
| 36 | lib/bcc/Script.cpp \ |
| 37 | helper/sha1.c |
| 38 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 39 | # Shared library for target |
| 40 | # ======================================================== |
| 41 | include $(CLEAR_VARS) |
| 42 | LOCAL_PRELINK_MODULE := false |
| 43 | LOCAL_MODULE := libbcc |
Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 44 | LOCAL_MODULE_TAGS := optional |
Logan | 61cb230 | 2010-11-27 14:18:26 +0800 | [diff] [blame] | 45 | LOCAL_SRC_FILES := \ |
Logan | cf3e521 | 2010-12-29 01:44:55 +0800 | [diff] [blame] | 46 | $(libbcc_SRC_FILES) \ |
Logan | 61cb230 | 2010-11-27 14:18:26 +0800 | [diff] [blame] | 47 | runtime/lib/arm/adddf3vfp.S \ |
| 48 | runtime/lib/arm/addsf3vfp.S \ |
| 49 | runtime/lib/arm/divdf3vfp.S \ |
| 50 | runtime/lib/arm/divsf3vfp.S \ |
| 51 | runtime/lib/arm/eqdf2vfp.S \ |
| 52 | runtime/lib/arm/eqsf2vfp.S \ |
| 53 | runtime/lib/arm/extendsfdf2vfp.S \ |
| 54 | runtime/lib/arm/fixdfsivfp.S \ |
| 55 | runtime/lib/arm/fixsfsivfp.S \ |
| 56 | runtime/lib/arm/fixunsdfsivfp.S \ |
| 57 | runtime/lib/arm/fixunssfsivfp.S \ |
| 58 | runtime/lib/arm/floatsidfvfp.S \ |
| 59 | runtime/lib/arm/floatsisfvfp.S \ |
| 60 | runtime/lib/arm/floatunssidfvfp.S \ |
| 61 | runtime/lib/arm/floatunssisfvfp.S \ |
| 62 | runtime/lib/arm/gedf2vfp.S \ |
| 63 | runtime/lib/arm/gesf2vfp.S \ |
| 64 | runtime/lib/arm/gtdf2vfp.S \ |
| 65 | runtime/lib/arm/gtsf2vfp.S \ |
| 66 | runtime/lib/arm/ledf2vfp.S \ |
| 67 | runtime/lib/arm/lesf2vfp.S \ |
| 68 | runtime/lib/arm/ltdf2vfp.S \ |
| 69 | runtime/lib/arm/ltsf2vfp.S \ |
| 70 | runtime/lib/arm/muldf3vfp.S \ |
| 71 | runtime/lib/arm/mulsf3vfp.S \ |
| 72 | runtime/lib/arm/nedf2vfp.S \ |
| 73 | runtime/lib/arm/negdf2vfp.S \ |
| 74 | runtime/lib/arm/negsf2vfp.S \ |
| 75 | runtime/lib/arm/nesf2vfp.S \ |
| 76 | runtime/lib/arm/subdf3vfp.S \ |
| 77 | runtime/lib/arm/subsf3vfp.S \ |
| 78 | runtime/lib/arm/truncdfsf2vfp.S \ |
| 79 | runtime/lib/arm/unorddf2vfp.S \ |
| 80 | runtime/lib/arm/unordsf2vfp.S |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 81 | |
Logan | 61cb230 | 2010-11-27 14:18:26 +0800 | [diff] [blame] | 82 | LOCAL_STATIC_LIBRARIES := \ |
| 83 | libLLVMARMCodeGen \ |
| 84 | libLLVMARMInfo \ |
| 85 | libLLVMBitReader \ |
| 86 | libLLVMSelectionDAG \ |
| 87 | libLLVMAsmPrinter \ |
| 88 | libLLVMCodeGen \ |
| 89 | libLLVMLinker \ |
| 90 | libLLVMJIT \ |
| 91 | libLLVMTarget \ |
| 92 | libLLVMMC \ |
| 93 | libLLVMScalarOpts \ |
| 94 | libLLVMInstCombine \ |
| 95 | libLLVMipo \ |
| 96 | libLLVMipa \ |
| 97 | libLLVMTransformUtils \ |
| 98 | libLLVMCore \ |
| 99 | libLLVMSupport \ |
| 100 | libLLVMSystem \ |
| 101 | libLLVMAnalysis |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 102 | |
Shih-wei Liao | 7c5a5f7 | 2010-11-08 01:59:13 -0800 | [diff] [blame] | 103 | LOCAL_SHARED_LIBRARIES := libdl libcutils libutils libstlport |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 104 | |
Logan | 61cb230 | 2010-11-27 14:18:26 +0800 | [diff] [blame] | 105 | LOCAL_C_INCLUDES := \ |
Logan | 8b77a77 | 2010-12-21 09:11:01 +0800 | [diff] [blame] | 106 | $(LOCAL_PATH)/helper \ |
Logan | c439523 | 2010-11-27 18:54:17 +0800 | [diff] [blame] | 107 | $(LOCAL_PATH)/include \ |
| 108 | $(LOCAL_PATH) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 109 | |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 110 | ifeq ($(USE_DISASSEMBLER),true) |
| 111 | LOCAL_CFLAGS += -DUSE_DISASSEMBLER |
Logan | 61cb230 | 2010-11-27 14:18:26 +0800 | [diff] [blame] | 112 | LOCAL_STATIC_LIBRARIES := \ |
| 113 | libLLVMARMDisassembler \ |
| 114 | libLLVMARMAsmPrinter \ |
| 115 | libLLVMMCParser \ |
| 116 | $(LOCAL_STATIC_LIBRARIES) |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 117 | endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 118 | |
Doug Kwan | 75dacc1 | 2010-07-20 16:54:58 -0700 | [diff] [blame] | 119 | # This hides most of the symbols in the shared library and reduces the size |
| 120 | # of libbcc.so by about 800k. |
| 121 | LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL |
| 122 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 123 | include $(LLVM_ROOT_PATH)/llvm-device-build.mk |
| 124 | include $(BUILD_SHARED_LIBRARY) |
| 125 | |
| 126 | # Shared library for host |
| 127 | # ======================================================== |
| 128 | include $(CLEAR_VARS) |
| 129 | |
| 130 | LOCAL_MODULE := libbcc |
Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 131 | LOCAL_MODULE_TAGS := optional |
Logan | 61cb230 | 2010-11-27 14:18:26 +0800 | [diff] [blame] | 132 | LOCAL_SRC_FILES := \ |
Logan | cf3e521 | 2010-12-29 01:44:55 +0800 | [diff] [blame] | 133 | $(libbcc_SRC_FILES) \ |
| 134 | helper/logd_write.c |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 135 | |
Logan | 61cb230 | 2010-11-27 14:18:26 +0800 | [diff] [blame] | 136 | LOCAL_STATIC_LIBRARIES := \ |
| 137 | libcutils \ |
| 138 | libLLVMX86CodeGen \ |
| 139 | libLLVMX86Info \ |
| 140 | libLLVMARMCodeGen \ |
| 141 | libLLVMARMInfo \ |
| 142 | libLLVMBitReader \ |
| 143 | libLLVMSelectionDAG \ |
| 144 | libLLVMAsmPrinter \ |
| 145 | libLLVMMCParser \ |
| 146 | libLLVMCodeGen \ |
| 147 | libLLVMLinker \ |
| 148 | libLLVMJIT \ |
| 149 | libLLVMTarget \ |
| 150 | libLLVMMC \ |
| 151 | libLLVMScalarOpts \ |
| 152 | libLLVMInstCombine \ |
| 153 | libLLVMipo \ |
| 154 | libLLVMipa \ |
| 155 | libLLVMTransformUtils \ |
| 156 | libLLVMCore \ |
| 157 | libLLVMSupport \ |
| 158 | libLLVMSystem \ |
| 159 | libLLVMAnalysis |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 160 | |
| 161 | LOCAL_LDLIBS := -ldl -lpthread |
| 162 | |
Logan | 61cb230 | 2010-11-27 14:18:26 +0800 | [diff] [blame] | 163 | LOCAL_C_INCLUDES := \ |
Logan | 8b77a77 | 2010-12-21 09:11:01 +0800 | [diff] [blame] | 164 | $(LOCAL_PATH)/helper \ |
Logan | c439523 | 2010-11-27 18:54:17 +0800 | [diff] [blame] | 165 | $(LOCAL_PATH)/include \ |
| 166 | $(LOCAL_PATH) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 167 | |
Shih-wei Liao | e64c287 | 2010-10-25 13:44:53 -0700 | [diff] [blame] | 168 | # definitions for LLVM |
Shih-wei Liao | 7c5a5f7 | 2010-11-08 01:59:13 -0800 | [diff] [blame] | 169 | 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] | 170 | |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 171 | ifeq ($(USE_DISASSEMBLER),true) |
| 172 | LOCAL_CFLAGS += -DUSE_DISASSEMBLER |
Logan | 61cb230 | 2010-11-27 14:18:26 +0800 | [diff] [blame] | 173 | LOCAL_STATIC_LIBRARIES := \ |
| 174 | libLLVMARMDisassembler \ |
| 175 | libLLVMARMAsmPrinter \ |
| 176 | libLLVMMCParser \ |
| 177 | $(LOCAL_STATIC_LIBRARIES) |
Shih-wei Liao | cd61af3 | 2010-04-29 00:02:57 -0700 | [diff] [blame] | 178 | endif |
| 179 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 180 | include $(LLVM_ROOT_PATH)/llvm-host-build.mk |
| 181 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 182 | |
| 183 | # Build children |
| 184 | # ======================================================== |
| 185 | |
| 186 | include $(call all-makefiles-under,$(LOCAL_PATH)) |
Carl Shapiro | 105a9d2 | 2010-04-13 17:53:26 -0700 | [diff] [blame] | 187 | |
Shih-wei Liao | 800e9c2 | 2010-04-18 16:08:16 -0700 | [diff] [blame] | 188 | endif # TARGET_SIMULATOR != true |