blob: 43755b4309a463b3eddd84f2c9febae6851e6343 [file] [log] [blame]
Carl Shapiro7b216702011-06-17 15:09:26 -07001#
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
Brian Carlstrom06809ed2012-09-17 14:19:20 -070017ART_USE_PORTABLE_COMPILER := false
18ifneq ($(wildcard art/USE_PORTABLE_COMPILER),)
19$(info Enabling ART_USE_PORTABLE_COMPILER because of existence of art/USE_PORTABLE_COMPILER)
20ART_USE_PORTABLE_COMPILER := true
21endif
22ifeq ($(WITH_ART_USE_PORTABLE_COMPILER),true)
23$(info Enabling ART_USE_PORTABLE_COMPILER because WITH_ART_USE_PORTABLE_COMPILER=true)
24ART_USE_PORTABLE_COMPILER := true
25endif
Shih-wei Liaod1fec812012-02-13 09:51:10 -080026
Shih-wei Liaod1fec812012-02-13 09:51:10 -080027LLVM_ROOT_PATH := external/llvm
28include $(LLVM_ROOT_PATH)/llvm.mk
Shih-wei Liaod1fec812012-02-13 09:51:10 -080029
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -080030# directory used for gtests on device
31ART_NATIVETEST_DIR := /data/nativetest/art
32ART_NATIVETEST_OUT := $(TARGET_OUT_DATA_NATIVE_TESTS)/art
33
Brian Carlstrom47a0d5a2011-10-12 21:20:05 -070034# directory used for tests on device
35ART_TEST_DIR := /data/art-test
36ART_TEST_OUT := $(TARGET_OUT_DATA)/art-test
37
Brian Carlstromcdc8de42011-07-19 14:23:17 -070038ART_CPP_EXTENSION := .cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -070039
Elliott Hughes0af55432011-08-17 18:37:28 -070040ART_C_INCLUDES := \
41 external/gtest/include \
Elliott Hughes8d768a92011-09-14 16:35:25 -070042 external/valgrind/dynamic_annotations \
buzbeec143c552011-08-20 17:38:58 -070043 external/zlib \
Brian Carlstrom700c8d32012-11-05 10:42:02 -080044 frameworks/compile/mclinker/include \
Elliott Hughesadb8c672012-03-06 16:49:32 -080045 art/src
Brian Carlstromb0460ea2011-07-29 10:08:05 -070046
Elliott Hughes1d3f1142011-09-13 12:00:00 -070047art_cflags := \
Ian Rogers646c3d72012-02-17 23:55:19 -080048 -O2 \
Carl Shapiro1fb86202011-06-27 17:43:13 -070049 -ggdb3 \
50 -Wall \
51 -Werror \
52 -Wextra \
Elliott Hugheseaa200d2012-01-05 16:30:31 -080053 -Wstrict-aliasing=3 \
Elliott Hughesf8349362012-06-18 15:00:06 -070054 -Wthread-safety \
Carl Shapiro1fb86202011-06-27 17:43:13 -070055 -fstrict-aliasing
56
Brian Carlstrom700c8d32012-11-05 10:42:02 -080057# TODO: enable -std=gnu++0x for auto support when on Ubuntu 12.04 LTS (Precise Pangolin)
58# On 10.04 LTS (Lucid Lynx), it can cause dependencies on GLIBCXX_3.4.14 version symbols.
59
Brian Carlstrom69d7a6b2011-12-15 17:31:21 -080060ifeq ($(HOST_OS),linux)
Shih-wei Liao24782c62012-01-08 12:46:11 -080061 art_non_debug_cflags := \
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070062 -Wframe-larger-than=1728
Brian Carlstrom69d7a6b2011-12-15 17:31:21 -080063endif
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070064
65art_debug_cflags := \
Ian Rogers1ffa32f2013-02-05 18:29:08 -080066 -fno-inline \
Elliott Hughes06e3ad42012-02-07 14:51:57 -080067 -DDYNAMIC_ANNOTATIONS_ENABLED=1 \
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070068 -UNDEBUG
69
jeffhao8161c032012-10-31 15:50:00 -070070# start of image reserved address space
71IMG_HOST_BASE_ADDRESS := 0x60000000
72
73ifeq ($(TARGET_ARCH),mips)
74IMG_TARGET_BASE_ADDRESS := 0x30000000
75else
76IMG_TARGET_BASE_ADDRESS := 0x60000000
77endif
78
79ART_HOST_CFLAGS := $(art_cflags) -DANDROID_SMP=1 -DART_BASE_ADDRESS=$(IMG_HOST_BASE_ADDRESS)
Elliott Hughesf8349362012-06-18 15:00:06 -070080# The host GCC isn't necessarily new enough to support -Wthread-safety (GCC 4.4).
Ian Rogers9adbff52013-01-23 18:19:03 -080081ART_HOST_CFLAGS := $(filter-out -Wthread-safety,$(ART_HOST_CFLAGS)) -msse2
82
83ifeq ($(TARGET_ARCH),x86)
84ART_TARGET_CFLAGS += -msse2
85endif
Elliott Hughes1d3f1142011-09-13 12:00:00 -070086
jeffhao8161c032012-10-31 15:50:00 -070087ART_TARGET_CFLAGS := $(art_cflags) -DART_TARGET -DART_BASE_ADDRESS=$(IMG_TARGET_BASE_ADDRESS)
Elliott Hughes1d3f1142011-09-13 12:00:00 -070088ifeq ($(TARGET_CPU_SMP),true)
89 ART_TARGET_CFLAGS += -DANDROID_SMP=1
90else
91 ART_TARGET_CFLAGS += -DANDROID_SMP=0
92endif
93
Brian Carlstrom89521892011-12-07 22:05:07 -080094# To use oprofile_android --callgraph, uncomment this and recompile with "mmm art -B -j16"
95# ART_TARGET_CFLAGS += -fno-omit-frame-pointer -marm -mapcs
96
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070097ART_HOST_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
98ART_TARGET_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
99
Brian Carlstromfd2ec542012-05-02 15:08:57 -0700100# TODO: move -fkeep-inline-functions to art_debug_cflags when target gcc > 4.4 (and -lsupc++)
Elliott Hughes1ba27142012-01-20 15:32:00 -0800101ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags) -fkeep-inline-functions
Brian Carlstromfd2ec542012-05-02 15:08:57 -0700102ART_HOST_DEBUG_LDLIBS := -lsupc++
Elliott Hughesad6c9c32012-01-19 17:39:12 -0800103
104ifneq ($(HOST_OS),linux)
105 # Some Mac OS pthread header files are broken with -fkeep-inline-functions.
Elliott Hughes34cf5142012-01-20 16:39:13 -0800106 ART_HOST_DEBUG_CFLAGS := $(filter-out -fkeep-inline-functions,$(ART_HOST_DEBUG_CFLAGS))
Elliott Hughes60234562012-06-01 12:25:59 -0700107 # Mac OS doesn't have libsupc++.
108 ART_HOST_DEBUG_LDLIBS := $(filter-out -lsupc++,$(ART_HOST_DEBUG_LDLIBS))
Elliott Hughesad6c9c32012-01-19 17:39:12 -0800109endif
110
Brian Carlstrom86927212011-09-15 11:31:11 -0700111ART_TARGET_DEBUG_CFLAGS := $(art_debug_cflags)
Elliott Hughes1d3f1142011-09-13 12:00:00 -0700112
Ian Rogersc928de92013-02-27 14:30:44 -0800113ifeq ($(ART_USE_PORTABLE_COMPILER),true)
TDYa12758e63f92012-04-24 13:16:47 -0700114PARALLEL_ART_COMPILE_JOBS := -j8
115endif
116
Brian Carlstrom69b15fb2011-09-03 12:25:21 -0700117DEX2OAT_SRC_FILES := \
118 src/dex2oat.cc
119
Brian Carlstrom78128a62011-09-15 17:21:19 -0700120OATDUMP_SRC_FILES := \
Elliott Hughes3e778f72012-05-21 15:29:52 -0700121 src/oatdump.cc
Brian Carlstrom78128a62011-09-15 17:21:19 -0700122
Brian Carlstrom69b15fb2011-09-03 12:25:21 -0700123OATEXEC_SRC_FILES := \
124 src/oatexec.cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -0700125
Brian Carlstrom934486c2011-07-12 23:42:50 -0700126LIBART_COMMON_SRC_FILES := \
Elliott Hughes5ea047b2011-09-13 14:38:18 -0700127 src/atomic.cc.arm \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800128 src/barrier.cc \
Elliott Hughes07ed66b2012-12-12 18:34:25 -0800129 src/base/logging.cc \
Elliott Hughes76b61672012-12-12 17:47:30 -0800130 src/base/mutex.cc \
Elliott Hughese222ee02012-12-13 14:41:43 -0800131 src/base/stringpiece.cc \
132 src/base/stringprintf.cc \
Ian Rogersc928de92013-02-27 14:30:44 -0800133 src/base/timing_logger.cc \
Elliott Hughes76160052012-12-12 16:31:20 -0800134 src/base/unix_file/fd_file.cc \
135 src/base/unix_file/mapped_file.cc \
136 src/base/unix_file/null_file.cc \
137 src/base/unix_file/random_access_file_utils.cc \
138 src/base/unix_file/string_file.cc \
Elliott Hughesa2501992011-08-26 19:39:54 -0700139 src/check_jni.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700140 src/class_linker.cc \
Ian Rogers87e552d2012-08-31 15:54:48 -0700141 src/common_throws.cc \
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700142 src/compiled_method.cc \
Ian Rogers1212a022013-03-04 10:48:41 -0800143 src/compiler/driver/compiler_driver.cc \
Ian Rogers4c1c2832013-03-04 18:30:13 -0800144 src/compiler/llvm/runtime_support_llvm.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700145 src/debugger.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700146 src/dex_file.cc \
jeffhao10037c82012-01-23 15:06:23 -0800147 src/dex_file_verifier.cc \
Carl Shapiro12eb78e2011-06-24 14:51:06 -0700148 src/dex_instruction.cc \
Elliott Hughes3e778f72012-05-21 15:29:52 -0700149 src/disassembler.cc \
150 src/disassembler_arm.cc \
151 src/disassembler_mips.cc \
152 src/disassembler_x86.cc \
Ian Rogers15bf2d32012-08-28 17:33:04 -0700153 src/dlmalloc.cc \
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800154 src/elf_file.cc \
Brian Carlstromcd60ac72013-01-20 17:09:51 -0800155 src/file_output_stream.cc \
Mathieu Chartier7469ebf2012-09-24 16:28:36 -0700156 src/gc/card_table.cc \
Mathieu Chartier2b82db42012-11-14 17:29:05 -0800157 src/gc/garbage_collector.cc \
Mathieu Chartier7469ebf2012-09-24 16:28:36 -0700158 src/gc/heap_bitmap.cc \
Mathieu Chartier1c23e1e2012-10-12 14:14:11 -0700159 src/gc/large_object_space.cc \
Mathieu Chartier7469ebf2012-09-24 16:28:36 -0700160 src/gc/mark_sweep.cc \
161 src/gc/mod_union_table.cc \
Mathieu Chartier2b82db42012-11-14 17:29:05 -0800162 src/gc/partial_mark_sweep.cc \
Mathieu Chartier7469ebf2012-09-24 16:28:36 -0700163 src/gc/space.cc \
164 src/gc/space_bitmap.cc \
Mathieu Chartier2b82db42012-11-14 17:29:05 -0800165 src/gc/sticky_mark_sweep.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700166 src/heap.cc \
Jesse Wilsonc4824e62011-11-01 14:39:04 -0400167 src/hprof/hprof.cc \
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700168 src/image.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700169 src/image_writer.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700170 src/indirect_reference_table.cc \
jeffhao725a9572012-11-13 18:20:12 -0800171 src/instrumentation.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700172 src/intern_table.cc \
Ian Rogers2fa6b2e2012-10-17 00:10:17 -0700173 src/interpreter/interpreter.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700174 src/jdwp/jdwp_event.cc \
175 src/jdwp/jdwp_expand_buf.cc \
176 src/jdwp/jdwp_handler.cc \
177 src/jdwp/jdwp_main.cc \
Elliott Hughes4b9702c2013-02-20 18:13:24 -0800178 src/jdwp/jdwp_request.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700179 src/jdwp/jdwp_socket.cc \
Elliott Hughes64f574f2013-02-20 14:57:12 -0800180 src/jdwp/object_registry.cc \
Ian Rogersdf20fe02011-07-20 20:34:16 -0700181 src/jni_internal.cc \
Ian Rogers00f7d0e2012-07-19 15:28:27 -0700182 src/jobject_comparator.cc \
Ian Rogers81d425b2012-09-27 16:03:43 -0700183 src/locks.cc \
Brian Carlstrom27ec9612011-09-19 20:20:38 -0700184 src/mem_map.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700185 src/memory_region.cc \
Elliott Hughes64f574f2013-02-20 14:57:12 -0800186 src/mirror/abstract_method.cc \
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800187 src/mirror/array.cc \
188 src/mirror/class.cc \
189 src/mirror/dex_cache.cc \
190 src/mirror/field.cc \
191 src/mirror/object.cc \
192 src/mirror/stack_trace_element.cc \
193 src/mirror/string.cc \
194 src/mirror/throwable.cc \
Elliott Hughes54e7df12011-09-16 11:47:04 -0700195 src/monitor.cc \
Ian Rogers0dae08e2012-04-14 13:55:11 -0700196 src/native/dalvik_system_DexFile.cc \
197 src/native/dalvik_system_VMDebug.cc \
198 src/native/dalvik_system_VMRuntime.cc \
199 src/native/dalvik_system_VMStack.cc \
200 src/native/dalvik_system_Zygote.cc \
201 src/native/java_lang_Class.cc \
202 src/native/java_lang_Object.cc \
203 src/native/java_lang_Runtime.cc \
204 src/native/java_lang_String.cc \
205 src/native/java_lang_System.cc \
206 src/native/java_lang_Thread.cc \
207 src/native/java_lang_Throwable.cc \
208 src/native/java_lang_VMClassLoader.cc \
209 src/native/java_lang_reflect_Array.cc \
210 src/native/java_lang_reflect_Constructor.cc \
211 src/native/java_lang_reflect_Field.cc \
212 src/native/java_lang_reflect_Method.cc \
213 src/native/java_lang_reflect_Proxy.cc \
214 src/native/java_util_concurrent_atomic_AtomicLong.cc \
215 src/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc \
216 src/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \
217 src/native/sun_misc_Unsafe.cc \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800218 src/oat.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700219 src/oat/runtime/arm/stub_arm.cc \
jeffhao7fbee072012-08-24 17:56:54 -0700220 src/oat/runtime/mips/stub_mips.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700221 src/oat/runtime/x86/stub_x86.cc \
222 src/oat/utils/arm/assembler_arm.cc \
223 src/oat/utils/arm/managed_register_arm.cc \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800224 src/oat/utils/assembler.cc \
jeffhao7fbee072012-08-24 17:56:54 -0700225 src/oat/utils/mips/assembler_mips.cc \
226 src/oat/utils/mips/managed_register_mips.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700227 src/oat/utils/x86/assembler_x86.cc \
228 src/oat/utils/x86/managed_register_x86.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700229 src/oat_file.cc \
230 src/oat_writer.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700231 src/offsets.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700232 src/os_linux.cc \
Brian Carlstromae826982011-11-09 01:33:42 -0800233 src/primitive.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700234 src/reference_table.cc \
Elliott Hughes418d20f2011-09-22 14:00:39 -0700235 src/reflection.cc \
Carl Shapirod4e48fd2011-06-30 18:53:29 -0700236 src/runtime.cc \
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -0800237 src/runtime_support.cc \
Elliott Hughese27955c2011-08-26 15:21:24 -0700238 src/signal_catcher.cc \
Elliott Hughes68e76522011-10-05 13:22:16 -0700239 src/stack.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700240 src/thread.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700241 src/thread_list.cc \
Mathieu Chartier0e4627e2012-10-23 16:13:36 -0700242 src/thread_pool.cc \
jeffhaoe343b762011-12-05 16:36:44 -0800243 src/trace.cc \
Elliott Hughes814e4032011-08-23 12:07:56 -0700244 src/utf.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700245 src/utils.cc \
Brian Carlstromcd60ac72013-01-20 17:09:51 -0800246 src/vector_output_stream.cc \
Ian Rogers0c7abda2012-09-19 13:33:42 -0700247 src/verifier/dex_gc_map.cc \
Ian Rogers7b3ddd22013-02-21 15:19:52 -0800248 src/verifier/instruction_flags.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700249 src/verifier/method_verifier.cc \
250 src/verifier/reg_type.cc \
251 src/verifier/reg_type_cache.cc \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800252 src/verifier/register_line.cc \
253 src/well_known_classes.cc \
254 src/zip_archive.cc
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700255
Ian Rogers57b86d42012-03-27 16:05:41 -0700256LIBART_COMMON_SRC_FILES += \
Ian Rogers57b86d42012-03-27 16:05:41 -0700257 src/oat/runtime/context.cc \
258 src/oat/runtime/support_alloc.cc \
259 src/oat/runtime/support_cast.cc \
260 src/oat/runtime/support_debug.cc \
Ian Rogers306057f2012-11-26 12:45:53 -0800261 src/oat/runtime/support_deoptimize.cc \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800262 src/oat/runtime/support_dexcache.cc \
Ian Rogers57b86d42012-03-27 16:05:41 -0700263 src/oat/runtime/support_field.cc \
264 src/oat/runtime/support_fillarray.cc \
jeffhao725a9572012-11-13 18:20:12 -0800265 src/oat/runtime/support_instrumentation.cc \
Ian Rogers57b86d42012-03-27 16:05:41 -0700266 src/oat/runtime/support_invoke.cc \
267 src/oat/runtime/support_jni.cc \
268 src/oat/runtime/support_locks.cc \
269 src/oat/runtime/support_math.cc \
270 src/oat/runtime/support_proxy.cc \
271 src/oat/runtime/support_stubs.cc \
272 src/oat/runtime/support_thread.cc \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800273 src/oat/runtime/support_throw.cc \
Ian Rogersc928de92013-02-27 14:30:44 -0800274 src/oat/runtime/support_interpreter.cc
Shih-wei Liaod1fec812012-02-13 09:51:10 -0800275
Brian Carlstrom934486c2011-07-12 23:42:50 -0700276LIBART_TARGET_SRC_FILES := \
277 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughes07ed66b2012-12-12 18:34:25 -0800278 src/base/logging_android.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700279 src/jdwp/jdwp_adb.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700280 src/monitor_android.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700281 src/runtime_android.cc \
Brian Carlstrom51477332012-03-25 20:20:26 -0700282 src/thread_android.cc
283
284ifeq ($(TARGET_ARCH),arm)
Ian Rogers57b86d42012-03-27 16:05:41 -0700285LIBART_TARGET_SRC_FILES += \
286 src/oat/runtime/arm/context_arm.cc.arm \
287 src/oat/runtime/arm/oat_support_entrypoints_arm.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700288 src/oat/runtime/arm/runtime_support_arm.S
Brian Carlstrom51477332012-03-25 20:20:26 -0700289else # TARGET_ARCH != arm
290ifeq ($(TARGET_ARCH),x86)
Ian Rogers57b86d42012-03-27 16:05:41 -0700291LIBART_TARGET_SRC_FILES += \
292 src/oat/runtime/x86/context_x86.cc \
293 src/oat/runtime/x86/oat_support_entrypoints_x86.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700294 src/oat/runtime/x86/runtime_support_x86.S
Brian Carlstrom51477332012-03-25 20:20:26 -0700295else # TARGET_ARCH != x86
296ifeq ($(TARGET_ARCH),mips)
Ian Rogers57b86d42012-03-27 16:05:41 -0700297LIBART_TARGET_SRC_FILES += \
jeffhao7fbee072012-08-24 17:56:54 -0700298 src/oat/runtime/mips/context_mips.cc \
Ian Rogers57b86d42012-03-27 16:05:41 -0700299 src/oat/runtime/mips/oat_support_entrypoints_mips.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700300 src/oat/runtime/mips/runtime_support_mips.S
301else # TARGET_ARCH != mips
302$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
303endif # TARGET_ARCH != mips
304endif # TARGET_ARCH != x86
305endif # TARGET_ARCH != arm
Ian Rogers776ac1f2012-04-13 23:36:36 -0700306
307ifeq ($(TARGET_ARCH),arm)
308LIBART_TARGET_SRC_FILES += src/thread_arm.cc
309else # TARGET_ARCH != arm
310ifeq ($(TARGET_ARCH),x86)
311LIBART_TARGET_SRC_FILES += src/thread_x86.cc
312else # TARGET_ARCH != x86
313ifeq ($(TARGET_ARCH),mips)
314LIBART_TARGET_SRC_FILES += src/thread_mips.cc
Brian Carlstrom51477332012-03-25 20:20:26 -0700315else # TARGET_ARCH != mips
316$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
317endif # TARGET_ARCH != mips
318endif # TARGET_ARCH != x86
319endif # TARGET_ARCH != arm
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700320
Brian Carlstrom934486c2011-07-12 23:42:50 -0700321LIBART_HOST_SRC_FILES := \
322 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughes07ed66b2012-12-12 18:34:25 -0800323 src/base/logging_linux.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700324 src/monitor_linux.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700325 src/runtime_linux.cc \
Brian Carlstrom51477332012-03-25 20:20:26 -0700326 src/thread_linux.cc
327
328ifeq ($(HOST_ARCH),x86)
Ian Rogers57b86d42012-03-27 16:05:41 -0700329LIBART_HOST_SRC_FILES += \
Ian Rogers57b86d42012-03-27 16:05:41 -0700330 src/oat/runtime/x86/context_x86.cc \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800331 src/oat/runtime/x86/oat_support_entrypoints_x86.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700332 src/oat/runtime/x86/runtime_support_x86.S
333else # HOST_ARCH != x86
334$(error unsupported HOST_ARCH=$(HOST_ARCH))
335endif # HOST_ARCH != x86
Ian Rogers776ac1f2012-04-13 23:36:36 -0700336
337ifeq ($(HOST_ARCH),x86)
338LIBART_HOST_SRC_FILES += src/thread_x86.cc
Brian Carlstrom51477332012-03-25 20:20:26 -0700339else # HOST_ARCH != x86
340$(error unsupported HOST_ARCH=$(HOST_ARCH))
341endif # HOST_ARCH != x86
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700342
Ian Rogers776ac1f2012-04-13 23:36:36 -0700343
Elliott Hughes0e57ccb2012-04-03 16:04:52 -0700344LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := \
Elliott Hughes76b61672012-12-12 17:47:30 -0800345 src/base/mutex.h \
buzbee395116c2013-02-27 14:30:25 -0800346 src/compiler/dex/compiler_enums.h \
Brian Carlstrom88f36542012-10-16 23:24:21 -0700347 src/dex_file.h \
Ian Rogersa75a0132012-09-28 11:41:42 -0700348 src/dex_instruction.h \
Ian Rogersc928de92013-02-27 14:30:44 -0800349 src/gc/gc_type.h \
Mathieu Chartier7469ebf2012-09-24 16:28:36 -0700350 src/gc/space.h \
Mathieu Chartierfd678be2012-08-30 14:50:54 -0700351 src/heap.h \
Elliott Hughes0e57ccb2012-04-03 16:04:52 -0700352 src/indirect_reference_table.h \
353 src/instruction_set.h \
354 src/invoke_type.h \
Elliott Hughes460384f2012-04-04 16:53:10 -0700355 src/jdwp/jdwp.h \
356 src/jdwp/jdwp_constants.h \
Ian Rogers81d425b2012-09-27 16:03:43 -0700357 src/locks.h \
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800358 src/mirror/class.h \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700359 src/thread.h \
Ian Rogersc928de92013-02-27 14:30:44 -0800360 src/thread_state.h \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800361 src/verifier/method_verifier.h
Elliott Hughes0e57ccb2012-04-03 16:04:52 -0700362
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700363LIBARTTEST_COMMON_SRC_FILES := \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800364 test/ReferenceMap/stack_walk_refmap_jni.cc \
365 test/StackWalk/stack_walk_jni.cc
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700366
Brian Carlstrom934486c2011-07-12 23:42:50 -0700367TEST_COMMON_SRC_FILES := \
Mathieu Chartier0e4627e2012-10-23 16:13:36 -0700368 src/barrier_test.cc \
Sameer Abu Asala8439542013-02-14 16:06:42 -0800369 src/base/histogram_test.cc \
Elliott Hughes76b61672012-12-12 17:47:30 -0800370 src/base/mutex_test.cc \
Elliott Hughes76160052012-12-12 16:31:20 -0800371 src/base/unix_file/fd_file_test.cc \
372 src/base/unix_file/mapped_file_test.cc \
373 src/base/unix_file/null_file_test.cc \
374 src/base/unix_file/random_access_file_utils_test.cc \
375 src/base/unix_file/string_file_test.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700376 src/class_linker_test.cc \
Ian Rogers1212a022013-03-04 10:48:41 -0800377 src/compiler/driver/compiler_driver_test.cc \
Ian Rogers8550c9c2013-03-04 12:21:02 -0800378 src/compiler/jni/jni_compiler_test.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700379 src/dex_file_test.cc \
380 src/dex_instruction_visitor_test.cc \
Brian Carlstrom265091e2013-01-30 14:08:26 -0800381 src/dex_method_iterator_test.cc \
Brian Carlstrom700c8d32012-11-05 10:42:02 -0800382 src/elf_writer_test.cc \
Shih-wei Liao2fb97532011-08-11 16:17:23 -0700383 src/exception_test.cc \
Mathieu Chartier7469ebf2012-09-24 16:28:36 -0700384 src/gc/space_bitmap_test.cc \
385 src/gc/space_test.cc \
Brian Carlstrom4b2966b2012-05-22 08:54:52 -0700386 src/gtest_test.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -0700387 src/heap_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700388 src/image_test.cc \
Ian Rogers2bcb4a42012-11-08 10:39:18 -0800389 src/indenter_test.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700390 src/indirect_reference_table_test.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700391 src/intern_table_test.cc \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800392 src/jni_internal_test.cc \
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800393 src/mirror/dex_cache_test.cc \
Ian Rogersc928de92013-02-27 14:30:44 -0800394 src/mirror/object_test.cc \
Ian Rogers57b86d42012-03-27 16:05:41 -0700395 src/oat/utils/arm/managed_register_arm_test.cc \
396 src/oat/utils/x86/managed_register_x86_test.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700397 src/oat_test.cc \
Brian Carlstromcd60ac72013-01-20 17:09:51 -0800398 src/output_stream_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700399 src/reference_table_test.cc \
Logan Chien008fa512012-06-22 08:09:57 -0700400 src/runtime_support_test.cc \
Carl Shapirofc322c72011-07-27 00:20:01 -0700401 src/runtime_test.cc \
Mathieu Chartier0e4627e2012-10-23 16:13:36 -0700402 src/thread_pool_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700403 src/utils_test.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700404 src/verifier/method_verifier_test.cc \
Brian Carlstrom6ff7f802013-01-30 13:55:02 -0800405 src/verifier/reg_type_test.cc \
406 src/zip_archive_test.cc
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700407
Brian Carlstrom934486c2011-07-12 23:42:50 -0700408TEST_TARGET_SRC_FILES := \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700409 $(TEST_COMMON_SRC_FILES)
Carl Shapiro008e4122011-06-23 17:27:46 -0700410
Brian Carlstrom934486c2011-07-12 23:42:50 -0700411TEST_HOST_SRC_FILES := \
412 $(TEST_COMMON_SRC_FILES) \
Ian Rogers57b86d42012-03-27 16:05:41 -0700413 src/oat/utils/x86/assembler_x86_test.cc
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700414
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800415# subdirectories of test/ which are used as inputs for gtests
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700416TEST_DEX_DIRECTORIES := \
Shih-wei Liao303b01e2011-09-14 00:46:13 -0700417 AbstractMethod \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700418 AllFields \
Ian Rogers0571d352011-11-03 19:51:38 -0700419 CreateMethodSignature \
Brian Carlstrom33f741e2011-10-03 11:24:05 -0700420 ExceptionHandle \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700421 Interfaces \
422 Main \
423 MyClass \
424 MyClassNatives \
425 Nested \
Elliott Hughes77405792012-03-15 15:22:12 -0700426 NonStaticLeafMethods \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700427 ProtoCompare \
428 ProtoCompare2 \
429 StaticLeafMethods \
430 Statics \
jeffhaoabcfde32011-09-29 15:05:18 -0700431 StaticsFromCode \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700432 XandY
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700433
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800434# subdirectories of test/ which are used with test-art-target-oat
Ian Rogers9ac995b2013-01-10 19:46:57 -0800435# Declare the simplest tests (Main, HelloWorld) first, the rest are alphabetical
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800436TEST_OAT_DIRECTORIES := \
437 Main \
438 HelloWorld \
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800439 \
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800440 ParallelGC \
441 ReferenceMap \
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800442 StackWalk \
443 ThreadStress
444
445# TODO: Enable when the StackWalk2 tests are passing
446# StackWalk2 \
447
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700448ART_BUILD_TARGET := false
449ART_BUILD_HOST := false
Brian Carlstrom265091e2013-01-30 14:08:26 -0800450ART_BUILD_NDEBUG := false
451ART_BUILD_DEBUG := false
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700452ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
453 ART_BUILD_TARGET := true
Brian Carlstrom265091e2013-01-30 14:08:26 -0800454 ART_BUILD_NDEBUG := true
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700455endif
456ifeq ($(ART_BUILD_TARGET_DEBUG),true)
457 ART_BUILD_TARGET := true
Brian Carlstrom265091e2013-01-30 14:08:26 -0800458 ART_BUILD_DEBUG := true
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700459endif
460ifeq ($(ART_BUILD_HOST_NDEBUG),true)
461 ART_BUILD_HOST := true
Brian Carlstrom265091e2013-01-30 14:08:26 -0800462 ART_BUILD_NDEBUG := true
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700463endif
464ifeq ($(ART_BUILD_HOST_DEBUG),true)
465 ART_BUILD_HOST := true
Brian Carlstrom265091e2013-01-30 14:08:26 -0800466 ART_BUILD_DEBUG := true
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700467endif