Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2011 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 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 19 | include art/build/Android.common_build.mk |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 20 | |
| 21 | LIBART_COMMON_SRC_FILES := \ |
Mathieu Chartier | c785344 | 2015-03-27 14:35:38 -0700 | [diff] [blame] | 22 | art_field.cc \ |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 23 | art_method.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 24 | atomic.cc.arm \ |
| 25 | barrier.cc \ |
| 26 | base/allocator.cc \ |
Mathieu Chartier | b666f48 | 2015-02-18 14:33:14 -0800 | [diff] [blame] | 27 | base/arena_allocator.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 28 | base/bit_vector.cc \ |
| 29 | base/hex_dump.cc \ |
| 30 | base/logging.cc \ |
| 31 | base/mutex.cc \ |
Mathieu Chartier | b666f48 | 2015-02-18 14:33:14 -0800 | [diff] [blame] | 32 | base/scoped_arena_allocator.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 33 | base/scoped_flock.cc \ |
| 34 | base/stringpiece.cc \ |
| 35 | base/stringprintf.cc \ |
Vladimir Marko | 80afd02 | 2015-05-19 18:08:00 +0100 | [diff] [blame] | 36 | base/time_utils.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 37 | base/timing_logger.cc \ |
| 38 | base/unix_file/fd_file.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 39 | base/unix_file/random_access_file_utils.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 40 | check_jni.cc \ |
| 41 | class_linker.cc \ |
Mathieu Chartier | cc5ebdf | 2015-07-27 11:19:43 -0700 | [diff] [blame] | 42 | class_table.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 43 | common_throws.cc \ |
| 44 | debugger.cc \ |
| 45 | dex_file.cc \ |
| 46 | dex_file_verifier.cc \ |
| 47 | dex_instruction.cc \ |
| 48 | elf_file.cc \ |
Man Cao | 8c2ff64 | 2015-05-27 17:25:30 -0700 | [diff] [blame] | 49 | gc/allocation_record.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 50 | gc/allocator/dlmalloc.cc \ |
| 51 | gc/allocator/rosalloc.cc \ |
Mathieu Chartier | 4858a93 | 2015-01-23 13:18:53 -0800 | [diff] [blame] | 52 | gc/accounting/bitmap.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 53 | gc/accounting/card_table.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 54 | gc/accounting/heap_bitmap.cc \ |
| 55 | gc/accounting/mod_union_table.cc \ |
| 56 | gc/accounting/remembered_set.cc \ |
| 57 | gc/accounting/space_bitmap.cc \ |
| 58 | gc/collector/concurrent_copying.cc \ |
| 59 | gc/collector/garbage_collector.cc \ |
| 60 | gc/collector/immune_region.cc \ |
| 61 | gc/collector/mark_compact.cc \ |
| 62 | gc/collector/mark_sweep.cc \ |
| 63 | gc/collector/partial_mark_sweep.cc \ |
| 64 | gc/collector/semi_space.cc \ |
| 65 | gc/collector/sticky_mark_sweep.cc \ |
| 66 | gc/gc_cause.cc \ |
| 67 | gc/heap.cc \ |
| 68 | gc/reference_processor.cc \ |
| 69 | gc/reference_queue.cc \ |
| 70 | gc/space/bump_pointer_space.cc \ |
| 71 | gc/space/dlmalloc_space.cc \ |
| 72 | gc/space/image_space.cc \ |
| 73 | gc/space/large_object_space.cc \ |
| 74 | gc/space/malloc_space.cc \ |
Hiroshi Yamauchi | 2cd334a | 2015-01-09 14:03:35 -0800 | [diff] [blame] | 75 | gc/space/region_space.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 76 | gc/space/rosalloc_space.cc \ |
| 77 | gc/space/space.cc \ |
| 78 | gc/space/zygote_space.cc \ |
Mathieu Chartier | a5eae69 | 2014-12-17 17:56:03 -0800 | [diff] [blame] | 79 | gc/task_processor.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 80 | hprof/hprof.cc \ |
| 81 | image.cc \ |
| 82 | indirect_reference_table.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 83 | instrumentation.cc \ |
| 84 | intern_table.cc \ |
| 85 | interpreter/interpreter.cc \ |
| 86 | interpreter/interpreter_common.cc \ |
Colin Cross | e84e4f7 | 2015-03-18 14:01:19 -0700 | [diff] [blame] | 87 | interpreter/interpreter_goto_table_impl.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 88 | interpreter/interpreter_switch_impl.cc \ |
Andreas Gampe | 2969bcd | 2015-03-09 12:57:41 -0700 | [diff] [blame] | 89 | interpreter/unstarted_runtime.cc \ |
Ian Rogers | 68d8b42 | 2014-07-17 11:09:10 -0700 | [diff] [blame] | 90 | java_vm_ext.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 91 | jdwp/jdwp_event.cc \ |
| 92 | jdwp/jdwp_expand_buf.cc \ |
| 93 | jdwp/jdwp_handler.cc \ |
| 94 | jdwp/jdwp_main.cc \ |
| 95 | jdwp/jdwp_request.cc \ |
| 96 | jdwp/jdwp_socket.cc \ |
| 97 | jdwp/object_registry.cc \ |
Ian Rogers | 68d8b42 | 2014-07-17 11:09:10 -0700 | [diff] [blame] | 98 | jni_env_ext.cc \ |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 99 | jit/jit.cc \ |
| 100 | jit/jit_code_cache.cc \ |
| 101 | jit/jit_instrumentation.cc \ |
Nicolas Geoffray | 5550ca8 | 2015-08-21 18:38:30 +0100 | [diff] [blame^] | 102 | jit/profiling_info.cc \ |
Igor Murashkin | fc1ccd7 | 2015-07-30 15:11:09 -0700 | [diff] [blame] | 103 | lambda/art_lambda_method.cc \ |
Igor Murashkin | e2facc5 | 2015-07-10 13:49:08 -0700 | [diff] [blame] | 104 | lambda/box_table.cc \ |
Igor Murashkin | fc1ccd7 | 2015-07-30 15:11:09 -0700 | [diff] [blame] | 105 | lambda/closure.cc \ |
| 106 | lambda/closure_builder.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 107 | jni_internal.cc \ |
| 108 | jobject_comparator.cc \ |
Mathieu Chartier | c785344 | 2015-03-27 14:35:38 -0700 | [diff] [blame] | 109 | linear_alloc.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 110 | mem_map.cc \ |
| 111 | memory_region.cc \ |
Mathieu Chartier | fc58af4 | 2015-04-16 18:00:39 -0700 | [diff] [blame] | 112 | mirror/abstract_method.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 113 | mirror/array.cc \ |
| 114 | mirror/class.cc \ |
| 115 | mirror/dex_cache.cc \ |
Mathieu Chartier | daaf326 | 2015-03-24 13:30:28 -0700 | [diff] [blame] | 116 | mirror/field.cc \ |
Mathieu Chartier | fc58af4 | 2015-04-16 18:00:39 -0700 | [diff] [blame] | 117 | mirror/method.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 118 | mirror/object.cc \ |
| 119 | mirror/reference.cc \ |
| 120 | mirror/stack_trace_element.cc \ |
| 121 | mirror/string.cc \ |
| 122 | mirror/throwable.cc \ |
| 123 | monitor.cc \ |
Calin Juravle | c842352 | 2014-08-12 20:55:20 +0100 | [diff] [blame] | 124 | native_bridge_art_interface.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 125 | native/dalvik_system_DexFile.cc \ |
| 126 | native/dalvik_system_VMDebug.cc \ |
| 127 | native/dalvik_system_VMRuntime.cc \ |
| 128 | native/dalvik_system_VMStack.cc \ |
| 129 | native/dalvik_system_ZygoteHooks.cc \ |
| 130 | native/java_lang_Class.cc \ |
| 131 | native/java_lang_DexCache.cc \ |
| 132 | native/java_lang_Object.cc \ |
| 133 | native/java_lang_Runtime.cc \ |
| 134 | native/java_lang_String.cc \ |
Jeff Hao | 848f70a | 2014-01-15 13:49:50 -0800 | [diff] [blame] | 135 | native/java_lang_StringFactory.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 136 | native/java_lang_System.cc \ |
| 137 | native/java_lang_Thread.cc \ |
| 138 | native/java_lang_Throwable.cc \ |
| 139 | native/java_lang_VMClassLoader.cc \ |
Mathieu Chartier | a5a53ef | 2014-09-12 12:58:05 -0700 | [diff] [blame] | 140 | native/java_lang_ref_FinalizerReference.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 141 | native/java_lang_ref_Reference.cc \ |
| 142 | native/java_lang_reflect_Array.cc \ |
| 143 | native/java_lang_reflect_Constructor.cc \ |
| 144 | native/java_lang_reflect_Field.cc \ |
| 145 | native/java_lang_reflect_Method.cc \ |
| 146 | native/java_lang_reflect_Proxy.cc \ |
| 147 | native/java_util_concurrent_atomic_AtomicLong.cc \ |
Jeff Hao | 848f70a | 2014-01-15 13:49:50 -0800 | [diff] [blame] | 148 | native/libcore_util_CharsetUtils.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 149 | native/org_apache_harmony_dalvik_ddmc_DdmServer.cc \ |
| 150 | native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \ |
| 151 | native/sun_misc_Unsafe.cc \ |
| 152 | oat.cc \ |
| 153 | oat_file.cc \ |
Richard Uhler | 66d874d | 2015-01-15 09:37:19 -0800 | [diff] [blame] | 154 | oat_file_assistant.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 155 | object_lock.cc \ |
| 156 | offsets.cc \ |
| 157 | os_linux.cc \ |
| 158 | parsed_options.cc \ |
| 159 | primitive.cc \ |
| 160 | quick_exception_handler.cc \ |
| 161 | quick/inline_method_analyser.cc \ |
| 162 | reference_table.cc \ |
| 163 | reflection.cc \ |
| 164 | runtime.cc \ |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 165 | runtime_options.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 166 | signal_catcher.cc \ |
| 167 | stack.cc \ |
Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 168 | stack_map.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 169 | thread.cc \ |
| 170 | thread_list.cc \ |
| 171 | thread_pool.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 172 | trace.cc \ |
| 173 | transaction.cc \ |
| 174 | profiler.cc \ |
| 175 | fault_handler.cc \ |
| 176 | utf.cc \ |
| 177 | utils.cc \ |
| 178 | verifier/dex_gc_map.cc \ |
| 179 | verifier/instruction_flags.cc \ |
| 180 | verifier/method_verifier.cc \ |
| 181 | verifier/reg_type.cc \ |
| 182 | verifier/reg_type_cache.cc \ |
| 183 | verifier/register_line.cc \ |
| 184 | well_known_classes.cc \ |
| 185 | zip_archive.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 186 | |
| 187 | LIBART_COMMON_SRC_FILES += \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 188 | arch/context.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 189 | arch/instruction_set.cc \ |
| 190 | arch/instruction_set_features.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 191 | arch/memcmp16.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 192 | arch/arm/instruction_set_features_arm.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 193 | arch/arm/registers_arm.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 194 | arch/arm64/instruction_set_features_arm64.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 195 | arch/arm64/registers_arm64.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 196 | arch/mips/instruction_set_features_mips.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 197 | arch/mips/registers_mips.cc \ |
Andreas Gampe | 57b3429 | 2015-01-14 15:45:59 -0800 | [diff] [blame] | 198 | arch/mips64/instruction_set_features_mips64.cc \ |
| 199 | arch/mips64/registers_mips64.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 200 | arch/x86/instruction_set_features_x86.cc \ |
| 201 | arch/x86/registers_x86.cc \ |
| 202 | arch/x86_64/registers_x86_64.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 203 | entrypoints/entrypoint_utils.cc \ |
| 204 | entrypoints/interpreter/interpreter_entrypoints.cc \ |
| 205 | entrypoints/jni/jni_entrypoints.cc \ |
| 206 | entrypoints/math_entrypoints.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 207 | entrypoints/quick/quick_alloc_entrypoints.cc \ |
| 208 | entrypoints/quick/quick_cast_entrypoints.cc \ |
| 209 | entrypoints/quick/quick_deoptimization_entrypoints.cc \ |
| 210 | entrypoints/quick/quick_dexcache_entrypoints.cc \ |
| 211 | entrypoints/quick/quick_field_entrypoints.cc \ |
| 212 | entrypoints/quick/quick_fillarray_entrypoints.cc \ |
| 213 | entrypoints/quick/quick_instrumentation_entrypoints.cc \ |
| 214 | entrypoints/quick/quick_jni_entrypoints.cc \ |
| 215 | entrypoints/quick/quick_lock_entrypoints.cc \ |
| 216 | entrypoints/quick/quick_math_entrypoints.cc \ |
| 217 | entrypoints/quick/quick_thread_entrypoints.cc \ |
| 218 | entrypoints/quick/quick_throw_entrypoints.cc \ |
| 219 | entrypoints/quick/quick_trampoline_entrypoints.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 220 | |
Elliott Hughes | 7ac7e32 | 2014-06-27 17:20:59 -0700 | [diff] [blame] | 221 | LIBART_TARGET_LDFLAGS := |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 222 | LIBART_HOST_LDFLAGS := |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 223 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 224 | LIBART_TARGET_SRC_FILES := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 225 | $(LIBART_COMMON_SRC_FILES) \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 226 | jdwp/jdwp_adb.cc \ |
| 227 | monitor_android.cc \ |
| 228 | runtime_android.cc \ |
| 229 | thread_android.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 230 | |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 231 | LIBART_TARGET_SRC_FILES_arm := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 232 | arch/arm/context_arm.cc.arm \ |
| 233 | arch/arm/entrypoints_init_arm.cc \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 234 | arch/arm/instruction_set_features_assembly_tests.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 235 | arch/arm/jni_entrypoints_arm.S \ |
| 236 | arch/arm/memcmp16_arm.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 237 | arch/arm/quick_entrypoints_arm.S \ |
Zheng Xu | 5667fdb | 2014-10-23 18:29:55 +0800 | [diff] [blame] | 238 | arch/arm/quick_entrypoints_cc_arm.cc \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 239 | arch/arm/thread_arm.cc \ |
| 240 | arch/arm/fault_handler_arm.cc |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 241 | |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 242 | LIBART_TARGET_SRC_FILES_arm64 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 243 | arch/arm64/context_arm64.cc \ |
| 244 | arch/arm64/entrypoints_init_arm64.cc \ |
| 245 | arch/arm64/jni_entrypoints_arm64.S \ |
| 246 | arch/arm64/memcmp16_arm64.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 247 | arch/arm64/quick_entrypoints_arm64.S \ |
| 248 | arch/arm64/thread_arm64.cc \ |
| 249 | monitor_pool.cc \ |
| 250 | arch/arm64/fault_handler_arm64.cc |
Stuart Monteith | b95a534 | 2014-03-12 13:32:32 +0000 | [diff] [blame] | 251 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 252 | LIBART_SRC_FILES_x86 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 253 | arch/x86/context_x86.cc \ |
| 254 | arch/x86/entrypoints_init_x86.cc \ |
| 255 | arch/x86/jni_entrypoints_x86.S \ |
Alexander Ivchenko | 907194a | 2014-07-14 18:54:34 +0400 | [diff] [blame] | 256 | arch/x86/memcmp16_x86.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 257 | arch/x86/quick_entrypoints_x86.S \ |
| 258 | arch/x86/thread_x86.cc \ |
| 259 | arch/x86/fault_handler_x86.cc |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 260 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 261 | LIBART_TARGET_SRC_FILES_x86 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 262 | $(LIBART_SRC_FILES_x86) |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 263 | |
Dave Allison | dfd3b47 | 2014-07-16 16:04:32 -0700 | [diff] [blame] | 264 | # Note that the fault_handler_x86.cc is not a mistake. This file is |
| 265 | # shared between the x86 and x86_64 architectures. |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 266 | LIBART_SRC_FILES_x86_64 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 267 | arch/x86_64/context_x86_64.cc \ |
| 268 | arch/x86_64/entrypoints_init_x86_64.cc \ |
| 269 | arch/x86_64/jni_entrypoints_x86_64.S \ |
Varvara Rainchik | 2a0bffd | 2014-07-30 17:01:24 +0400 | [diff] [blame] | 270 | arch/x86_64/memcmp16_x86_64.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 271 | arch/x86_64/quick_entrypoints_x86_64.S \ |
| 272 | arch/x86_64/thread_x86_64.cc \ |
| 273 | monitor_pool.cc \ |
Dave Allison | dfd3b47 | 2014-07-16 16:04:32 -0700 | [diff] [blame] | 274 | arch/x86/fault_handler_x86.cc |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 275 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 276 | LIBART_TARGET_SRC_FILES_x86_64 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 277 | $(LIBART_SRC_FILES_x86_64) \ |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 278 | |
| 279 | LIBART_TARGET_SRC_FILES_mips := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 280 | arch/mips/context_mips.cc \ |
| 281 | arch/mips/entrypoints_init_mips.cc \ |
| 282 | arch/mips/jni_entrypoints_mips.S \ |
| 283 | arch/mips/memcmp16_mips.S \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 284 | arch/mips/quick_entrypoints_mips.S \ |
| 285 | arch/mips/thread_mips.cc \ |
| 286 | arch/mips/fault_handler_mips.cc |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 287 | |
Andreas Gampe | 1a5c406 | 2015-01-15 12:10:47 -0800 | [diff] [blame] | 288 | LIBART_TARGET_SRC_FILES_mips64 := \ |
| 289 | arch/mips64/context_mips64.cc \ |
| 290 | arch/mips64/entrypoints_init_mips64.cc \ |
| 291 | arch/mips64/jni_entrypoints_mips64.S \ |
| 292 | arch/mips64/memcmp16_mips64.S \ |
| 293 | arch/mips64/quick_entrypoints_mips64.S \ |
| 294 | arch/mips64/thread_mips64.cc \ |
| 295 | monitor_pool.cc \ |
| 296 | arch/mips64/fault_handler_mips64.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 297 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 298 | LIBART_HOST_SRC_FILES := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 299 | $(LIBART_COMMON_SRC_FILES) \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 300 | monitor_linux.cc \ |
| 301 | runtime_linux.cc \ |
| 302 | thread_linux.cc |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 303 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 304 | LIBART_HOST_SRC_FILES_32 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 305 | $(LIBART_SRC_FILES_x86) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 306 | |
Ying Wang | c6585b7 | 2014-04-23 18:19:44 -0700 | [diff] [blame] | 307 | LIBART_HOST_SRC_FILES_64 := \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 308 | $(LIBART_SRC_FILES_x86_64) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 309 | |
| 310 | LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := \ |
Ian Rogers | d582fa4 | 2014-11-05 23:46:43 -0800 | [diff] [blame] | 311 | arch/instruction_set.h \ |
Mathieu Chartier | bad0267 | 2014-08-25 13:08:22 -0700 | [diff] [blame] | 312 | base/allocator.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 313 | base/mutex.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 314 | debugger.h \ |
Andreas Gampe | 4303ba9 | 2014-11-06 01:00:46 -0800 | [diff] [blame] | 315 | base/unix_file/fd_file.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 316 | dex_file.h \ |
| 317 | dex_instruction.h \ |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 318 | dex_instruction_utils.h \ |
Mathieu Chartier | e34fa1d | 2015-01-14 14:55:47 -0800 | [diff] [blame] | 319 | gc_root.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 320 | gc/allocator_type.h \ |
Mathieu Chartier | 14c3bf9 | 2015-07-13 14:35:43 -0700 | [diff] [blame] | 321 | gc/allocator/rosalloc.h \ |
Mathieu Chartier | b363f66 | 2014-07-16 13:28:58 -0700 | [diff] [blame] | 322 | gc/collector_type.h \ |
Mathieu Chartier | 14c3bf9 | 2015-07-13 14:35:43 -0700 | [diff] [blame] | 323 | gc/collector/gc_type.h \ |
| 324 | gc/heap.h \ |
Hiroshi Yamauchi | d25f842 | 2015-01-30 16:25:12 -0800 | [diff] [blame] | 325 | gc/space/region_space.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 326 | gc/space/space.h \ |
Mathieu Chartier | 14c3bf9 | 2015-07-13 14:35:43 -0700 | [diff] [blame] | 327 | gc/weak_root_state.h \ |
Mathieu Chartier | e401d14 | 2015-04-22 13:56:20 -0700 | [diff] [blame] | 328 | image.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 329 | instrumentation.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 330 | indirect_reference_table.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 331 | invoke_type.h \ |
| 332 | jdwp/jdwp.h \ |
| 333 | jdwp/jdwp_constants.h \ |
| 334 | lock_word.h \ |
| 335 | mirror/class.h \ |
| 336 | oat.h \ |
| 337 | object_callbacks.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 338 | profiler_options.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 339 | quick/inline_method_analyser.h \ |
Ian Rogers | 6a3c1fc | 2014-10-31 00:33:20 -0700 | [diff] [blame] | 340 | runtime.h \ |
| 341 | stack.h \ |
Ian Rogers | 22d5e73 | 2014-07-15 22:23:51 -0700 | [diff] [blame] | 342 | thread.h \ |
| 343 | thread_state.h \ |
| 344 | verifier/method_verifier.h |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 345 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 346 | LIBART_CFLAGS := -DBUILDING_LIBART=1 |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 347 | |
Shinichiro Hamaji | 028aec2 | 2015-07-29 16:30:29 +0900 | [diff] [blame] | 348 | LIBART_TARGET_CFLAGS := |
| 349 | LIBART_HOST_CFLAGS := |
| 350 | |
Christopher Ferris | fc35de0 | 2014-07-10 18:53:22 -0700 | [diff] [blame] | 351 | ifeq ($(MALLOC_IMPL),dlmalloc) |
Shinichiro Hamaji | 028aec2 | 2015-07-29 16:30:29 +0900 | [diff] [blame] | 352 | LIBART_TARGET_CFLAGS += -DUSE_DLMALLOC |
Christopher Ferris | fc35de0 | 2014-07-10 18:53:22 -0700 | [diff] [blame] | 353 | else |
Shinichiro Hamaji | 028aec2 | 2015-07-29 16:30:29 +0900 | [diff] [blame] | 354 | LIBART_TARGET_CFLAGS += -DUSE_JEMALLOC |
Christopher Ferris | c4ddc04 | 2014-05-13 14:47:50 -0700 | [diff] [blame] | 355 | endif |
| 356 | |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 357 | # Default dex2oat instruction set features. |
| 358 | LIBART_HOST_DEFAULT_INSTRUCTION_SET_FEATURES := default |
| 359 | LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := default |
| 360 | 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := default |
| 361 | ifeq ($(DEX2OAT_TARGET_ARCH),arm) |
| 362 | ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a15 krait denver)) |
Andreas Gampe | 72a122c | 2014-11-13 19:10:33 -0800 | [diff] [blame] | 363 | LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := atomic_ldrd_strd,div |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 364 | else |
| 365 | ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a7)) |
| 366 | LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := div |
| 367 | endif |
| 368 | endif |
| 369 | endif |
| 370 | ifeq ($(2ND_DEX2OAT_TARGET_ARCH),arm) |
| 371 | ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a15 krait denver)) |
Andreas Gampe | 72a122c | 2014-11-13 19:10:33 -0800 | [diff] [blame] | 372 | 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := atomic_ldrd_strd,div |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 373 | else |
| 374 | ifneq (,$(filter $(DEX2OAT_TARGET_CPU_VARIANT),cortex-a7)) |
| 375 | 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := div |
| 376 | endif |
| 377 | endif |
| 378 | endif |
| 379 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 380 | # $(1): target or host |
| 381 | # $(2): ndebug or debug |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 382 | # $(3): static or shared (empty means shared, applies only for host) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 383 | define build-libart |
| 384 | ifneq ($(1),target) |
| 385 | ifneq ($(1),host) |
| 386 | $$(error expected target or host for argument 1, received $(1)) |
| 387 | endif |
| 388 | endif |
| 389 | ifneq ($(2),ndebug) |
| 390 | ifneq ($(2),debug) |
| 391 | $$(error expected ndebug or debug for argument 2, received $(2)) |
| 392 | endif |
| 393 | endif |
| 394 | |
| 395 | art_target_or_host := $(1) |
| 396 | art_ndebug_or_debug := $(2) |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 397 | art_static_or_shared := $(3) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 398 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 399 | include $$(CLEAR_VARS) |
| 400 | LOCAL_CPP_EXTENSION := $$(ART_CPP_EXTENSION) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 401 | ifeq ($$(art_ndebug_or_debug),ndebug) |
| 402 | LOCAL_MODULE := libart |
Dehao Chen | 6c36a8b | 2014-11-13 14:13:58 -0800 | [diff] [blame] | 403 | ifeq ($$(art_target_or_host),target) |
| 404 | LOCAL_FDO_SUPPORT := true |
| 405 | endif |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 406 | else # debug |
| 407 | LOCAL_MODULE := libartd |
| 408 | endif |
| 409 | |
| 410 | LOCAL_MODULE_TAGS := optional |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 411 | |
| 412 | ifeq ($$(art_static_or_shared),static) |
| 413 | LOCAL_MODULE_CLASS := STATIC_LIBRARIES |
| 414 | else |
| 415 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 416 | endif |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 417 | |
| 418 | ifeq ($$(art_target_or_host),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 419 | LOCAL_SRC_FILES := $$(LIBART_TARGET_SRC_FILES) |
| 420 | $$(foreach arch,$$(ART_TARGET_SUPPORTED_ARCH), \ |
| 421 | $$(eval LOCAL_SRC_FILES_$$(arch) := $$$$(LIBART_TARGET_SRC_FILES_$$(arch)))) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 422 | else # host |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 423 | LOCAL_SRC_FILES := $$(LIBART_HOST_SRC_FILES) |
| 424 | LOCAL_SRC_FILES_32 := $$(LIBART_HOST_SRC_FILES_32) |
| 425 | LOCAL_SRC_FILES_64 := $$(LIBART_HOST_SRC_FILES_64) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 426 | LOCAL_IS_HOST_MODULE := true |
| 427 | endif |
| 428 | |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 429 | GENERATED_SRC_DIR := $$(call local-generated-sources-dir) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 430 | ENUM_OPERATOR_OUT_CC_FILES := $$(patsubst %.h,%_operator_out.cc,$$(LIBART_ENUM_OPERATOR_OUT_HEADER_FILES)) |
| 431 | ENUM_OPERATOR_OUT_GEN := $$(addprefix $$(GENERATED_SRC_DIR)/,$$(ENUM_OPERATOR_OUT_CC_FILES)) |
| 432 | |
| 433 | $$(ENUM_OPERATOR_OUT_GEN): art/tools/generate-operator-out.py |
| 434 | $$(ENUM_OPERATOR_OUT_GEN): PRIVATE_CUSTOM_TOOL = art/tools/generate-operator-out.py $(LOCAL_PATH) $$< > $$@ |
| 435 | $$(ENUM_OPERATOR_OUT_GEN): $$(GENERATED_SRC_DIR)/%_operator_out.cc : $(LOCAL_PATH)/%.h |
| 436 | $$(transform-generated-source) |
| 437 | |
| 438 | LOCAL_GENERATED_SOURCES += $$(ENUM_OPERATOR_OUT_GEN) |
| 439 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 440 | LOCAL_CFLAGS := $$(LIBART_CFLAGS) |
Dan Albert | 58bea4a | 2014-08-09 18:08:07 -0700 | [diff] [blame] | 441 | LOCAL_LDFLAGS := $$(LIBART_LDFLAGS) |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 442 | ifeq ($$(art_target_or_host),target) |
Shinichiro Hamaji | 028aec2 | 2015-07-29 16:30:29 +0900 | [diff] [blame] | 443 | LOCAL_CFLAGS += $$(LIBART_TARGET_CFLAGS) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 444 | LOCAL_LDFLAGS += $$(LIBART_TARGET_LDFLAGS) |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 445 | else #host |
Shinichiro Hamaji | 028aec2 | 2015-07-29 16:30:29 +0900 | [diff] [blame] | 446 | LOCAL_CFLAGS += $$(LIBART_HOST_CFLAGS) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 447 | LOCAL_LDFLAGS += $$(LIBART_HOST_LDFLAGS) |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 448 | ifeq ($$(art_static_or_shared),static) |
| 449 | LOCAL_LDFLAGS += -static |
| 450 | endif |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 451 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 452 | $$(foreach arch,$$(ART_TARGET_SUPPORTED_ARCH), \ |
| 453 | $$(eval LOCAL_LDFLAGS_$$(arch) := $$(LIBART_TARGET_LDFLAGS_$$(arch)))) |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 454 | |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 455 | # Clang usage |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 456 | ifeq ($$(art_target_or_host),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 457 | $$(eval $$(call set-target-local-clang-vars)) |
| 458 | $$(eval $$(call set-target-local-cflags-vars,$(2))) |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 459 | LOCAL_CFLAGS_$(DEX2OAT_TARGET_ARCH) += -DART_DEFAULT_INSTRUCTION_SET_FEATURES="$(LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES)" |
| 460 | LOCAL_CFLAGS_$(2ND_DEX2OAT_TARGET_ARCH) += -DART_DEFAULT_INSTRUCTION_SET_FEATURES="$(2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES)" |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 461 | else # host |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 462 | LOCAL_CLANG := $$(ART_HOST_CLANG) |
| 463 | LOCAL_LDLIBS := $$(ART_HOST_LDLIBS) |
| 464 | LOCAL_LDLIBS += -ldl -lpthread |
| 465 | ifeq ($$(HOST_OS),linux) |
| 466 | LOCAL_LDLIBS += -lrt |
| 467 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 468 | LOCAL_CFLAGS += $$(ART_HOST_CFLAGS) |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 469 | LOCAL_CFLAGS += -DART_DEFAULT_INSTRUCTION_SET_FEATURES="$(LIBART_HOST_DEFAULT_INSTRUCTION_SET_FEATURES)" |
Roland Levillain | 12bd721 | 2015-06-04 17:50:27 +0100 | [diff] [blame] | 470 | LOCAL_ASFLAGS += $$(ART_HOST_ASFLAGS) |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 471 | |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 472 | ifeq ($$(art_ndebug_or_debug),debug) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 473 | LOCAL_CFLAGS += $$(ART_HOST_DEBUG_CFLAGS) |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 474 | else |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 475 | LOCAL_CFLAGS += $$(ART_HOST_NON_DEBUG_CFLAGS) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 476 | endif |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 477 | LOCAL_MULTILIB := both |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 478 | endif |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 479 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 480 | LOCAL_C_INCLUDES += $$(ART_C_INCLUDES) |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 481 | LOCAL_C_INCLUDES += art/cmdline |
Dave Allison | f4b80bc | 2014-05-14 15:41:25 -0700 | [diff] [blame] | 482 | LOCAL_C_INCLUDES += art/sigchainlib |
Igor Murashkin | aaebaa0 | 2015-01-26 10:55:53 -0800 | [diff] [blame] | 483 | LOCAL_C_INCLUDES += art |
Dave Allison | f4b80bc | 2014-05-14 15:41:25 -0700 | [diff] [blame] | 484 | |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 485 | ifeq ($$(art_static_or_shared),static) |
| 486 | LOCAL_STATIC_LIBRARIES := libnativehelper libnativebridge libsigchain_dummy libbacktrace |
| 487 | else |
| 488 | LOCAL_SHARED_LIBRARIES := libnativehelper libnativebridge libsigchain libbacktrace |
| 489 | endif |
| 490 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 491 | ifeq ($$(art_target_or_host),target) |
Ian Rogers | 872dd82 | 2014-10-30 11:19:14 -0700 | [diff] [blame] | 492 | LOCAL_SHARED_LIBRARIES += libdl |
| 493 | # ZipArchive support, the order matters here to get all symbols. |
Narayan Kamath | 657318c | 2015-04-28 09:56:28 +0100 | [diff] [blame] | 494 | LOCAL_STATIC_LIBRARIES := libziparchive libz libbase |
Ian Rogers | 872dd82 | 2014-10-30 11:19:14 -0700 | [diff] [blame] | 495 | # For android::FileMap used by libziparchive. |
| 496 | LOCAL_SHARED_LIBRARIES += libutils |
| 497 | # For liblog, atrace, properties, ashmem, set_sched_policy and socket_peer_is_trusted. |
| 498 | LOCAL_SHARED_LIBRARIES += libcutils |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 499 | else # host |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 500 | ifeq ($$(art_static_or_shared),static) |
Alex Light | 4cd27d6 | 2015-08-18 23:03:42 +0000 | [diff] [blame] | 501 | LOCAL_STATIC_LIBRARIES += libziparchive-host libz |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 502 | # For ashmem_create_region. |
| 503 | LOCAL_STATIC_LIBRARIES += libcutils |
| 504 | else |
Alex Light | 4cd27d6 | 2015-08-18 23:03:42 +0000 | [diff] [blame] | 505 | LOCAL_SHARED_LIBRARIES += libziparchive-host libz-host |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 506 | # For ashmem_create_region. |
| 507 | LOCAL_SHARED_LIBRARIES += libcutils |
| 508 | endif |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 509 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 510 | LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk |
Ian Rogers | c7dd295 | 2014-10-21 23:31:19 -0700 | [diff] [blame] | 511 | LOCAL_ADDITIONAL_DEPENDENCIES += $$(LOCAL_PATH)/Android.mk |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 512 | |
| 513 | ifeq ($$(art_target_or_host),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 514 | LOCAL_MODULE_TARGET_ARCH := $$(ART_TARGET_SUPPORTED_ARCH) |
Colin Cross | dc781a1 | 2014-02-04 16:22:03 -0800 | [diff] [blame] | 515 | endif |
| 516 | |
Dan Albert | 31fb260 | 2014-09-30 22:10:10 -0700 | [diff] [blame] | 517 | LOCAL_NATIVE_COVERAGE := $(ART_COVERAGE) |
| 518 | |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 519 | ifeq ($$(art_target_or_host),target) |
Christopher Ferris | d59b7b1 | 2014-04-01 12:29:09 -0700 | [diff] [blame] | 520 | ifneq ($$(art_ndebug_or_debug),debug) |
| 521 | # Leave the symbols in the shared library so that stack unwinders can |
| 522 | # produce meaningful name resolution. |
| 523 | LOCAL_STRIP_MODULE := keep_symbols |
| 524 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 525 | include $$(BUILD_SHARED_LIBRARY) |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 526 | else # host |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 527 | ifeq ($$(art_static_or_shared),static) |
| 528 | include $$(BUILD_HOST_STATIC_LIBRARY) |
| 529 | else |
| 530 | include $$(BUILD_HOST_SHARED_LIBRARY) |
| 531 | endif |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 532 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 533 | |
| 534 | # Clear locally defined variables. |
| 535 | GENERATED_SRC_DIR := |
| 536 | ENUM_OPERATOR_OUT_CC_FILES := |
| 537 | ENUM_OPERATOR_OUT_GEN := |
| 538 | art_target_or_host := |
| 539 | art_ndebug_or_debug := |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 540 | art_static_or_shared := |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 541 | endef |
| 542 | |
Ian Rogers | 719d1a3 | 2014-03-06 12:13:39 -0800 | [diff] [blame] | 543 | # We always build dex2oat and dependencies, even if the host build is otherwise disabled, since |
| 544 | # they are used to cross compile for the target. |
Junmo Park | 76ab347 | 2014-08-11 21:28:16 +0900 | [diff] [blame] | 545 | ifeq ($(ART_BUILD_HOST_NDEBUG),true) |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 546 | $(eval $(call build-libart,host,ndebug)) |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 547 | ifeq ($(ART_BUILD_HOST_STATIC),true) |
| 548 | $(eval $(call build-libart,host,ndebug,static)) |
| 549 | endif |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 550 | endif |
Junmo Park | 76ab347 | 2014-08-11 21:28:16 +0900 | [diff] [blame] | 551 | ifeq ($(ART_BUILD_HOST_DEBUG),true) |
Ian Rogers | c5f1773 | 2014-06-05 20:48:42 -0700 | [diff] [blame] | 552 | $(eval $(call build-libart,host,debug)) |
Calin Juravle | 65e069d | 2015-06-08 10:35:24 +0100 | [diff] [blame] | 553 | ifeq ($(ART_BUILD_HOST_STATIC),true) |
| 554 | $(eval $(call build-libart,host,debug,static)) |
| 555 | endif |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 556 | endif |
Ian Rogers | 719d1a3 | 2014-03-06 12:13:39 -0800 | [diff] [blame] | 557 | |
| 558 | ifeq ($(ART_BUILD_TARGET_NDEBUG),true) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 559 | # $(error $(call build-libart,target,ndebug)) |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 560 | $(eval $(call build-libart,target,ndebug)) |
Ian Rogers | 719d1a3 | 2014-03-06 12:13:39 -0800 | [diff] [blame] | 561 | endif |
| 562 | ifeq ($(ART_BUILD_TARGET_DEBUG),true) |
Andreas Gampe | 5ca4eaa | 2014-05-29 02:09:33 -0700 | [diff] [blame] | 563 | $(eval $(call build-libart,target,debug)) |
Ian Rogers | 719d1a3 | 2014-03-06 12:13:39 -0800 | [diff] [blame] | 564 | endif |
Dave Allison | f4b80bc | 2014-05-14 15:41:25 -0700 | [diff] [blame] | 565 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 566 | # Clear locally defined variables. |
| 567 | LOCAL_PATH := |
| 568 | LIBART_COMMON_SRC_FILES := |
Ian Rogers | 6f3dbba | 2014-10-14 17:41:57 -0700 | [diff] [blame] | 569 | LIBART_HOST_DEFAULT_INSTRUCTION_SET_FEATURES := |
| 570 | LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := |
| 571 | 2ND_LIBART_TARGET_DEFAULT_INSTRUCTION_SET_FEATURES := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 572 | LIBART_TARGET_LDFLAGS := |
| 573 | LIBART_HOST_LDFLAGS := |
| 574 | LIBART_TARGET_SRC_FILES := |
| 575 | LIBART_TARGET_SRC_FILES_arm := |
| 576 | LIBART_TARGET_SRC_FILES_arm64 := |
| 577 | LIBART_TARGET_SRC_FILES_x86 := |
| 578 | LIBART_TARGET_SRC_FILES_x86_64 := |
| 579 | LIBART_TARGET_SRC_FILES_mips := |
Andreas Gampe | 1a5c406 | 2015-01-15 12:10:47 -0800 | [diff] [blame] | 580 | LIBART_TARGET_SRC_FILES_mips64 := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 581 | LIBART_HOST_SRC_FILES := |
| 582 | LIBART_HOST_SRC_FILES_32 := |
| 583 | LIBART_HOST_SRC_FILES_64 := |
| 584 | LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := |
| 585 | LIBART_CFLAGS := |
Shinichiro Hamaji | 028aec2 | 2015-07-29 16:30:29 +0900 | [diff] [blame] | 586 | LIBART_TARGET_CFLAGS := |
| 587 | LIBART_HOST_CFLAGS := |
Elliott Hughes | 7ac7e32 | 2014-06-27 17:20:59 -0700 | [diff] [blame] | 588 | build-libart := |