blob: c4f04be9c6db4f7a111c190f56337ad50f7b9693 [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
Elliott Hughesf1eedca2012-04-20 16:00:32 -070017# TODO: move the LLVM compiler out into a separate shared library too...
Shih-wei Liaod1fec812012-02-13 09:51:10 -080018# Use llvm as the backend
19ifneq ($(wildcard art/USE_LLVM_COMPILER),)
20ART_USE_LLVM_COMPILER := true
21else
22ART_USE_LLVM_COMPILER := false
23endif
24
Shih-wei Liaoe94d9b22012-05-22 09:01:24 -070025ifneq ($(wildcard art/USE_GREENLAND_COMPILER),)
26ART_USE_GREENLAND_COMPILER := true
27else
28ART_USE_GREENLAND_COMPILER := false
29endif
30
buzbee2cfc6392012-05-07 14:51:40 -070031ifneq ($(wildcard art/USE_QUICK_COMPILER),)
32ART_USE_QUICK_COMPILER := true
33else
34ART_USE_QUICK_COMPILER := false
35endif
36
Shih-wei Liaoe94d9b22012-05-22 09:01:24 -070037ifeq ($(filter-out true,$(ART_USE_LLVM_COMPILER) $(ART_USE_GREENLAND_COMPILER)),)
38$(error Cannot enable art-greenland and art-llvm compiler simultaneously!)
39endif
40
buzbee2cfc6392012-05-07 14:51:40 -070041ifeq ($(filter true,$(ART_USE_LLVM_COMPILER) $(ART_USE_GREENLAND_COMPILER) $(ART_USE_QUICK_COMPILER)),true)
Shih-wei Liaoe94d9b22012-05-22 09:01:24 -070042ART_REQUIRE_LLVM := true
43else
44ART_REQUIRE_LLVM := false
45endif
46
47ifeq ($(ART_REQUIRE_LLVM),true)
Shih-wei Liaod1fec812012-02-13 09:51:10 -080048LLVM_ROOT_PATH := external/llvm
49include $(LLVM_ROOT_PATH)/llvm.mk
50endif
51
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -080052# directory used for gtests on device
53ART_NATIVETEST_DIR := /data/nativetest/art
54ART_NATIVETEST_OUT := $(TARGET_OUT_DATA_NATIVE_TESTS)/art
55
Brian Carlstrom47a0d5a2011-10-12 21:20:05 -070056# directory used for tests on device
57ART_TEST_DIR := /data/art-test
58ART_TEST_OUT := $(TARGET_OUT_DATA)/art-test
59
Brian Carlstromcdc8de42011-07-19 14:23:17 -070060ART_CPP_EXTENSION := .cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -070061
Elliott Hughes0af55432011-08-17 18:37:28 -070062ART_C_INCLUDES := \
63 external/gtest/include \
64 external/icu4c/common \
65 external/icu4c/i18n \
Elliott Hughes8d768a92011-09-14 16:35:25 -070066 external/valgrind/dynamic_annotations \
buzbeec143c552011-08-20 17:38:58 -070067 external/zlib \
Elliott Hughesadb8c672012-03-06 16:49:32 -080068 art/src
Brian Carlstromb0460ea2011-07-29 10:08:05 -070069
Elliott Hughes1d3f1142011-09-13 12:00:00 -070070art_cflags := \
Ian Rogers646c3d72012-02-17 23:55:19 -080071 -O2 \
Carl Shapiro1fb86202011-06-27 17:43:13 -070072 -ggdb3 \
73 -Wall \
74 -Werror \
75 -Wextra \
Elliott Hugheseaa200d2012-01-05 16:30:31 -080076 -Wstrict-aliasing=3 \
Elliott Hughesf8349362012-06-18 15:00:06 -070077 -Wthread-safety \
Carl Shapiro1fb86202011-06-27 17:43:13 -070078 -fno-align-jumps \
79 -fstrict-aliasing
80
Brian Carlstrom69d7a6b2011-12-15 17:31:21 -080081ifeq ($(HOST_OS),linux)
Shih-wei Liao24782c62012-01-08 12:46:11 -080082 art_non_debug_cflags := \
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070083 -Wframe-larger-than=1728
Brian Carlstrom69d7a6b2011-12-15 17:31:21 -080084endif
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070085
86art_debug_cflags := \
Elliott Hughes06e3ad42012-02-07 14:51:57 -080087 -DDYNAMIC_ANNOTATIONS_ENABLED=1 \
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070088 -UNDEBUG
89
Elliott Hughes1d3f1142011-09-13 12:00:00 -070090ART_HOST_CFLAGS := $(art_cflags) -DANDROID_SMP=1
Elliott Hughesf8349362012-06-18 15:00:06 -070091# The host GCC isn't necessarily new enough to support -Wthread-safety (GCC 4.4).
92ART_HOST_CFLAGS := $(filter-out -Wthread-safety,$(ART_HOST_CFLAGS))
Elliott Hughes1d3f1142011-09-13 12:00:00 -070093
Logan Chien08e1ba32012-05-08 15:08:51 +080094ART_TARGET_CFLAGS := $(art_cflags) -DART_TARGET
Elliott Hughes1d3f1142011-09-13 12:00:00 -070095ifeq ($(TARGET_CPU_SMP),true)
96 ART_TARGET_CFLAGS += -DANDROID_SMP=1
97else
98 ART_TARGET_CFLAGS += -DANDROID_SMP=0
99endif
100
Brian Carlstrom89521892011-12-07 22:05:07 -0800101# To use oprofile_android --callgraph, uncomment this and recompile with "mmm art -B -j16"
102# ART_TARGET_CFLAGS += -fno-omit-frame-pointer -marm -mapcs
103
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700104ART_HOST_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
105ART_TARGET_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
106
Brian Carlstromfd2ec542012-05-02 15:08:57 -0700107# TODO: move -fkeep-inline-functions to art_debug_cflags when target gcc > 4.4 (and -lsupc++)
Elliott Hughes1ba27142012-01-20 15:32:00 -0800108ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags) -fkeep-inline-functions
Brian Carlstromfd2ec542012-05-02 15:08:57 -0700109ART_HOST_DEBUG_LDLIBS := -lsupc++
Elliott Hughesad6c9c32012-01-19 17:39:12 -0800110
111ifneq ($(HOST_OS),linux)
112 # Some Mac OS pthread header files are broken with -fkeep-inline-functions.
Elliott Hughes34cf5142012-01-20 16:39:13 -0800113 ART_HOST_DEBUG_CFLAGS := $(filter-out -fkeep-inline-functions,$(ART_HOST_DEBUG_CFLAGS))
Elliott Hughes60234562012-06-01 12:25:59 -0700114 # Mac OS doesn't have libsupc++.
115 ART_HOST_DEBUG_LDLIBS := $(filter-out -lsupc++,$(ART_HOST_DEBUG_LDLIBS))
Elliott Hughesad6c9c32012-01-19 17:39:12 -0800116endif
117
Brian Carlstrom86927212011-09-15 11:31:11 -0700118ART_TARGET_DEBUG_CFLAGS := $(art_debug_cflags)
Elliott Hughes1d3f1142011-09-13 12:00:00 -0700119
TDYa12758e63f92012-04-24 13:16:47 -0700120ifeq ($(ART_USE_LLVM_COMPILER),true)
121PARALLEL_ART_COMPILE_JOBS := -j8
122endif
123
Brian Carlstrom69b15fb2011-09-03 12:25:21 -0700124DEX2OAT_SRC_FILES := \
125 src/dex2oat.cc
126
Brian Carlstrom78128a62011-09-15 17:21:19 -0700127OATDUMP_SRC_FILES := \
Elliott Hughes3e778f72012-05-21 15:29:52 -0700128 src/oatdump.cc
Brian Carlstrom78128a62011-09-15 17:21:19 -0700129
Brian Carlstrom69b15fb2011-09-03 12:25:21 -0700130OATEXEC_SRC_FILES := \
131 src/oatexec.cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -0700132
Brian Carlstrom934486c2011-07-12 23:42:50 -0700133LIBART_COMMON_SRC_FILES := \
Elliott Hughes5ea047b2011-09-13 14:38:18 -0700134 src/atomic.cc.arm \
Ian Rogers5d76c432011-10-31 21:42:49 -0700135 src/card_table.cc \
Elliott Hughesa2501992011-08-26 19:39:54 -0700136 src/check_jni.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700137 src/class_linker.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -0700138 src/class_loader.cc \
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700139 src/compiled_method.cc \
Brian Carlstrom9ea1cb12011-08-24 23:18:18 -0700140 src/compiler.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700141 src/debugger.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700142 src/dex_cache.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700143 src/dex_file.cc \
jeffhao10037c82012-01-23 15:06:23 -0800144 src/dex_file_verifier.cc \
Carl Shapiro12eb78e2011-06-24 14:51:06 -0700145 src/dex_instruction.cc \
Elliott Hughes3e778f72012-05-21 15:29:52 -0700146 src/disassembler.cc \
147 src/disassembler_arm.cc \
148 src/disassembler_mips.cc \
149 src/disassembler_x86.cc \
Ian Rogers30fab402012-01-23 15:43:46 -0800150 src/dlmalloc.c \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700151 src/file.cc \
152 src/file_linux.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700153 src/heap.cc \
Elliott Hughes5e71b522011-10-20 13:12:32 -0700154 src/heap_bitmap.cc \
Jesse Wilsonc4824e62011-11-01 14:39:04 -0400155 src/hprof/hprof.cc \
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700156 src/image.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700157 src/image_writer.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700158 src/indirect_reference_table.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700159 src/intern_table.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700160 src/jdwp/jdwp_event.cc \
161 src/jdwp/jdwp_expand_buf.cc \
162 src/jdwp/jdwp_handler.cc \
163 src/jdwp/jdwp_main.cc \
164 src/jdwp/jdwp_socket.cc \
Ian Rogersdf20fe02011-07-20 20:34:16 -0700165 src/jni_internal.cc \
Elliott Hughes42ee1422011-09-06 12:33:32 -0700166 src/logging.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700167 src/mark_stack.cc \
168 src/mark_sweep.cc \
Brian Carlstrom27ec9612011-09-19 20:20:38 -0700169 src/mem_map.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700170 src/memory_region.cc \
Mathieu Chartierb43b7d42012-06-19 13:15:09 -0700171 src/mod_union_table.cc \
Elliott Hughes54e7df12011-09-16 11:47:04 -0700172 src/monitor.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700173 src/mutex.cc \
Ian Rogers0dae08e2012-04-14 13:55:11 -0700174 src/native/dalvik_system_DexFile.cc \
175 src/native/dalvik_system_VMDebug.cc \
176 src/native/dalvik_system_VMRuntime.cc \
177 src/native/dalvik_system_VMStack.cc \
178 src/native/dalvik_system_Zygote.cc \
179 src/native/java_lang_Class.cc \
180 src/native/java_lang_Object.cc \
181 src/native/java_lang_Runtime.cc \
182 src/native/java_lang_String.cc \
183 src/native/java_lang_System.cc \
184 src/native/java_lang_Thread.cc \
185 src/native/java_lang_Throwable.cc \
186 src/native/java_lang_VMClassLoader.cc \
187 src/native/java_lang_reflect_Array.cc \
188 src/native/java_lang_reflect_Constructor.cc \
189 src/native/java_lang_reflect_Field.cc \
190 src/native/java_lang_reflect_Method.cc \
191 src/native/java_lang_reflect_Proxy.cc \
192 src/native/java_util_concurrent_atomic_AtomicLong.cc \
193 src/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc \
194 src/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \
195 src/native/sun_misc_Unsafe.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700196 src/oat/runtime/arm/stub_arm.cc \
197 src/oat/runtime/x86/stub_x86.cc \
198 src/oat/utils/arm/assembler_arm.cc \
199 src/oat/utils/arm/managed_register_arm.cc \
200 src/oat/utils/assembler.cc \
201 src/oat/utils/x86/assembler_x86.cc \
202 src/oat/utils/x86/managed_register_x86.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700203 src/oat.cc \
204 src/oat_file.cc \
205 src/oat_writer.cc \
Carl Shapiro3ee755d2011-06-28 12:11:04 -0700206 src/object.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700207 src/offsets.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700208 src/os_linux.cc \
Brian Carlstromae826982011-11-09 01:33:42 -0800209 src/primitive.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700210 src/reference_table.cc \
Elliott Hughes418d20f2011-09-22 14:00:39 -0700211 src/reflection.cc \
Carl Shapirod4e48fd2011-06-30 18:53:29 -0700212 src/runtime.cc \
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -0800213 src/runtime_support.cc \
Elliott Hughes88c5c352012-03-15 18:49:48 -0700214 src/scoped_thread_list_lock.cc \
Mathieu Chartier06f79872012-06-21 13:51:52 -0700215 src/scoped_thread_list_lock_releaser.cc \
Elliott Hughese27955c2011-08-26 15:21:24 -0700216 src/signal_catcher.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700217 src/space.cc \
Elliott Hughes68e76522011-10-05 13:22:16 -0700218 src/stack.cc \
Carl Shapirob5573532011-07-12 18:22:59 -0700219 src/stringpiece.cc \
Elliott Hugheseb4f6142011-07-15 17:43:51 -0700220 src/stringprintf.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700221 src/thread.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700222 src/thread_list.cc \
jeffhaoe343b762011-12-05 16:36:44 -0800223 src/trace.cc \
Elliott Hughes814e4032011-08-23 12:07:56 -0700224 src/utf.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700225 src/utils.cc \
Elliott Hugheseac76672012-05-24 21:56:51 -0700226 src/well_known_classes.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700227 src/zip_archive.cc \
228 src/verifier/gc_map.cc \
229 src/verifier/method_verifier.cc \
230 src/verifier/reg_type.cc \
231 src/verifier/reg_type_cache.cc \
232 src/verifier/register_line.cc
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700233
Shih-wei Liaod1fec812012-02-13 09:51:10 -0800234ifeq ($(ART_USE_LLVM_COMPILER),true)
235LIBART_COMMON_SRC_FILES += \
Logan Chien3fe0c602012-03-27 21:14:37 +0800236 src/compiler_llvm/elf_loader.cc \
Logan Chienfca7e872011-12-20 20:08:22 +0800237 src/compiler_llvm/inferred_reg_category_map.cc \
Logan Chien67008a62012-06-06 18:23:12 +0800238 src/compiler_llvm/procedure_linkage_table.cc \
Logan Chien937105a2012-04-02 02:37:37 +0800239 src/compiler_llvm/runtime_support_llvm.cc
Shih-wei Liao6e94f142012-04-16 18:14:14 -0700240endif
241
Shih-wei Liaoe94d9b22012-05-22 09:01:24 -0700242ifeq ($(ART_USE_GREENLAND_COMPILER),true)
243LIBART_COMMON_SRC_FILES += \
244 src/greenland/inferred_reg_category_map.cc
245endif
246
Ian Rogers57b86d42012-03-27 16:05:41 -0700247LIBART_COMMON_SRC_FILES += \
Ian Rogers57b86d42012-03-27 16:05:41 -0700248 src/oat/runtime/context.cc \
249 src/oat/runtime/support_alloc.cc \
250 src/oat/runtime/support_cast.cc \
251 src/oat/runtime/support_debug.cc \
252 src/oat/runtime/support_dexcache.cc \
253 src/oat/runtime/support_field.cc \
254 src/oat/runtime/support_fillarray.cc \
255 src/oat/runtime/support_invoke.cc \
256 src/oat/runtime/support_jni.cc \
257 src/oat/runtime/support_locks.cc \
258 src/oat/runtime/support_math.cc \
259 src/oat/runtime/support_proxy.cc \
260 src/oat/runtime/support_stubs.cc \
261 src/oat/runtime/support_thread.cc \
262 src/oat/runtime/support_throw.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700263 src/oat/runtime/support_trace.cc
Shih-wei Liaod1fec812012-02-13 09:51:10 -0800264
Brian Carlstrom934486c2011-07-12 23:42:50 -0700265LIBART_TARGET_SRC_FILES := \
266 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700267 src/jdwp/jdwp_adb.cc \
Elliott Hughesffe67362011-07-17 12:09:27 -0700268 src/logging_android.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700269 src/monitor_android.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700270 src/runtime_android.cc \
Brian Carlstrom51477332012-03-25 20:20:26 -0700271 src/thread_android.cc
272
273ifeq ($(TARGET_ARCH),arm)
Ian Rogers57b86d42012-03-27 16:05:41 -0700274LIBART_TARGET_SRC_FILES += \
275 src/oat/runtime/arm/context_arm.cc.arm \
276 src/oat/runtime/arm/oat_support_entrypoints_arm.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700277 src/oat/runtime/arm/runtime_support_arm.S
Brian Carlstrom51477332012-03-25 20:20:26 -0700278else # TARGET_ARCH != arm
279ifeq ($(TARGET_ARCH),x86)
Ian Rogers57b86d42012-03-27 16:05:41 -0700280LIBART_TARGET_SRC_FILES += \
281 src/oat/runtime/x86/context_x86.cc \
282 src/oat/runtime/x86/oat_support_entrypoints_x86.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700283 src/oat/runtime/x86/runtime_support_x86.S
Brian Carlstrom51477332012-03-25 20:20:26 -0700284else # TARGET_ARCH != x86
285ifeq ($(TARGET_ARCH),mips)
Ian Rogers57b86d42012-03-27 16:05:41 -0700286LIBART_TARGET_SRC_FILES += \
287 src/oat/runtime/mips/oat_support_entrypoints_mips.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700288 src/oat/runtime/mips/runtime_support_mips.S
289else # TARGET_ARCH != mips
290$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
291endif # TARGET_ARCH != mips
292endif # TARGET_ARCH != x86
293endif # TARGET_ARCH != arm
Ian Rogers776ac1f2012-04-13 23:36:36 -0700294
295ifeq ($(TARGET_ARCH),arm)
296LIBART_TARGET_SRC_FILES += src/thread_arm.cc
297else # TARGET_ARCH != arm
298ifeq ($(TARGET_ARCH),x86)
299LIBART_TARGET_SRC_FILES += src/thread_x86.cc
300else # TARGET_ARCH != x86
301ifeq ($(TARGET_ARCH),mips)
302LIBART_TARGET_SRC_FILES += src/thread_mips.cc
Brian Carlstrom51477332012-03-25 20:20:26 -0700303else # TARGET_ARCH != mips
304$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
305endif # TARGET_ARCH != mips
306endif # TARGET_ARCH != x86
307endif # TARGET_ARCH != arm
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700308
Brian Carlstrom934486c2011-07-12 23:42:50 -0700309LIBART_HOST_SRC_FILES := \
310 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughesffe67362011-07-17 12:09:27 -0700311 src/logging_linux.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700312 src/monitor_linux.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700313 src/runtime_linux.cc \
Brian Carlstrom51477332012-03-25 20:20:26 -0700314 src/thread_linux.cc
315
316ifeq ($(HOST_ARCH),x86)
Ian Rogers57b86d42012-03-27 16:05:41 -0700317LIBART_HOST_SRC_FILES += \
318 src/oat/runtime/x86/oat_support_entrypoints_x86.cc \
319 src/oat/runtime/x86/context_x86.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700320 src/oat/runtime/x86/runtime_support_x86.S
321else # HOST_ARCH != x86
322$(error unsupported HOST_ARCH=$(HOST_ARCH))
323endif # HOST_ARCH != x86
Ian Rogers776ac1f2012-04-13 23:36:36 -0700324
325ifeq ($(HOST_ARCH),x86)
326LIBART_HOST_SRC_FILES += src/thread_x86.cc
Brian Carlstrom51477332012-03-25 20:20:26 -0700327else # HOST_ARCH != x86
328$(error unsupported HOST_ARCH=$(HOST_ARCH))
329endif # HOST_ARCH != x86
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700330
Ian Rogers776ac1f2012-04-13 23:36:36 -0700331
Elliott Hughes0e57ccb2012-04-03 16:04:52 -0700332LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := \
333 src/indirect_reference_table.h \
334 src/instruction_set.h \
335 src/invoke_type.h \
Elliott Hughes460384f2012-04-04 16:53:10 -0700336 src/jdwp/jdwp.h \
337 src/jdwp/jdwp_constants.h \
Elliott Hughes34e06962012-04-09 13:55:55 -0700338 src/mutex.h \
Elliott Hughes48257562012-06-06 17:42:44 -0700339 src/object.h \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700340 src/thread.h \
341 src/verifier/method_verifier.h
Elliott Hughes0e57ccb2012-04-03 16:04:52 -0700342
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700343LIBARTTEST_COMMON_SRC_FILES := \
Shih-wei Liaoa6af3c32011-10-17 15:25:11 -0700344 test/StackWalk/stack_walk_jni.cc \
345 test/ReferenceMap/stack_walk_refmap_jni.cc
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700346
Brian Carlstrom934486c2011-07-12 23:42:50 -0700347TEST_COMMON_SRC_FILES := \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700348 src/class_linker_test.cc \
Brian Carlstromaded5f72011-10-07 17:15:04 -0700349 src/compiler_test.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700350 src/dex_cache_test.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700351 src/dex_file_test.cc \
352 src/dex_instruction_visitor_test.cc \
Shih-wei Liao2fb97532011-08-11 16:17:23 -0700353 src/exception_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700354 src/file_test.cc \
Brian Carlstrom4b2966b2012-05-22 08:54:52 -0700355 src/gtest_test.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -0700356 src/heap_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700357 src/image_test.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700358 src/indirect_reference_table_test.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700359 src/intern_table_test.cc \
Ian Rogerscd2764f2011-09-02 15:38:24 -0700360 src/jni_internal_test.cc \
361 src/jni_compiler_test.cc \
Ian Rogers57b86d42012-03-27 16:05:41 -0700362 src/oat/utils/arm/managed_register_arm_test.cc \
363 src/oat/utils/x86/managed_register_x86_test.cc \
Brian Carlstromcd74c4b2012-01-23 13:21:00 -0800364 src/mutex_test.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700365 src/oat_test.cc \
Carl Shapiro894d0fa2011-06-30 14:48:49 -0700366 src/object_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700367 src/reference_table_test.cc \
Logan Chien008fa512012-06-22 08:09:57 -0700368 src/runtime_support_test.cc \
Carl Shapirofc322c72011-07-27 00:20:01 -0700369 src/runtime_test.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700370 src/space_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700371 src/utils_test.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700372 src/zip_archive_test.cc \
373 src/verifier/method_verifier_test.cc \
374 src/verifier/reg_type_test.cc
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700375
Brian Carlstrom934486c2011-07-12 23:42:50 -0700376TEST_TARGET_SRC_FILES := \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700377 $(TEST_COMMON_SRC_FILES)
Carl Shapiro008e4122011-06-23 17:27:46 -0700378
Brian Carlstrom934486c2011-07-12 23:42:50 -0700379TEST_HOST_SRC_FILES := \
380 $(TEST_COMMON_SRC_FILES) \
Ian Rogers57b86d42012-03-27 16:05:41 -0700381 src/oat/utils/x86/assembler_x86_test.cc
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700382
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800383# subdirectories of test/ which are used as inputs for gtests
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700384TEST_DEX_DIRECTORIES := \
Shih-wei Liao303b01e2011-09-14 00:46:13 -0700385 AbstractMethod \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700386 AllFields \
Ian Rogers0571d352011-11-03 19:51:38 -0700387 CreateMethodSignature \
Brian Carlstrom33f741e2011-10-03 11:24:05 -0700388 ExceptionHandle \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700389 IntMath \
390 Interfaces \
391 Main \
392 MyClass \
393 MyClassNatives \
394 Nested \
Elliott Hughes77405792012-03-15 15:22:12 -0700395 NonStaticLeafMethods \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700396 ProtoCompare \
397 ProtoCompare2 \
398 StaticLeafMethods \
399 Statics \
jeffhaoabcfde32011-09-29 15:05:18 -0700400 StaticsFromCode \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700401 XandY
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700402
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800403# subdirectories of test/ which are used with test-art-target-oat
404# Declare the simplest tests (Main, HelloWorld, and Fibonacci) first, the rest are alphabetical
405TEST_OAT_DIRECTORIES := \
406 Main \
407 HelloWorld \
408 Fibonacci \
409 \
410 ExceptionTest \
411 GrowthLimit \
Mathieu Chartierbba47a42012-05-30 10:53:58 -0700412 ConcurrentGC \
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800413 IntMath \
414 Invoke \
415 MemUsage \
416 ParallelGC \
417 ReferenceMap \
418 ReflectionTest \
419 StackWalk \
420 ThreadStress
421
422# TODO: Enable when the StackWalk2 tests are passing
423# StackWalk2 \
424
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700425ART_BUILD_TARGET := false
426ART_BUILD_HOST := false
427ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
428 ART_BUILD_TARGET := true
429endif
430ifeq ($(ART_BUILD_TARGET_DEBUG),true)
431 ART_BUILD_TARGET := true
432endif
433ifeq ($(ART_BUILD_HOST_NDEBUG),true)
434 ART_BUILD_HOST := true
435endif
436ifeq ($(ART_BUILD_HOST_DEBUG),true)
437 ART_BUILD_HOST := true
438endif