blob: c5a640769569a77075958dc96af0f28a9479b144 [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
Shih-wei Liaod1fec812012-02-13 09:51:10 -080019ART_USE_LLVM_COMPILER := false
Brian Carlstrom9ba4f472012-07-18 23:04:15 -070020ifneq ($(wildcard art/USE_LLVM_COMPILER),)
21$(info Enabling ART_USE_LLVM_COMPILER because of existence of art/USE_LLVM_COMPILER)
22ART_USE_LLVM_COMPILER := true
23endif
24ifeq ($(WITH_ART_USE_LLVM_COMPILER),true)
25$(info Enabling ART_USE_LLVM_COMPILER because WITH_ART_USE_LLVM_COMPILER=true)
26ART_USE_LLVM_COMPILER := true
Shih-wei Liaod1fec812012-02-13 09:51:10 -080027endif
28
Shih-wei Liaoe94d9b22012-05-22 09:01:24 -070029ART_USE_GREENLAND_COMPILER := false
Brian Carlstrom9ba4f472012-07-18 23:04:15 -070030ifneq ($(wildcard art/USE_GREENLAND_COMPILER),)
31$(info Enabling ART_USE_GREENLAND_COMPILER because of existence of art/USE_GREENLAND_COMPILER)
32ART_USE_GREENLAND_COMPILER := true
33endif
34ifeq ($(WITH_ART_USE_GREENLAND_COMPILER),true)
35$(info Enabling ART_USE_GREENLAND_COMPILER because WITH_ART_USE_GREENLAND_COMPILER=true)
36ART_USE_GREENLAND_COMPILER := true
Shih-wei Liaoe94d9b22012-05-22 09:01:24 -070037endif
38
Brian Carlstrom9ba4f472012-07-18 23:04:15 -070039ART_USE_QUICK_COMPILER := false
buzbee2cfc6392012-05-07 14:51:40 -070040ifneq ($(wildcard art/USE_QUICK_COMPILER),)
41ART_USE_QUICK_COMPILER := true
Brian Carlstrom9ba4f472012-07-18 23:04:15 -070042$(info Enabling ART_USE_QUICK_COMPILER because of existence of art/USE_QUICK_COMPILER)
43endif
44ifeq ($(WITH_ART_USE_QUICK_COMPILER),true)
45ART_USE_QUICK_COMPILER := true
46$(info Enabling ART_USE_QUICK_COMPILER because WITH_ART_USE_QUICK_COMPILER=true)
buzbee2cfc6392012-05-07 14:51:40 -070047endif
48
Brian Carlstrom9ba4f472012-07-18 23:04:15 -070049ifeq ($(words $(filter true,$(ART_USE_LLVM_COMPILER) $(ART_USE_GREENLAND_COMPILER) $(ART_USE_QUICK_COMPILER))),0)
Shih-wei Liaoe94d9b22012-05-22 09:01:24 -070050ART_REQUIRE_LLVM := false
Brian Carlstrom9ba4f472012-07-18 23:04:15 -070051else #!0
52ifeq ($(words $(filter true,$(ART_USE_LLVM_COMPILER) $(ART_USE_GREENLAND_COMPILER) $(ART_USE_QUICK_COMPILER))),1)
53ART_REQUIRE_LLVM := true
54else #!1
55$(error Cannot enable combinations of art-greenland, art-llvm, and art-quick compiler simultaneously!)
56endif #!1
57endif #!0
Shih-wei Liaoe94d9b22012-05-22 09:01:24 -070058
59ifeq ($(ART_REQUIRE_LLVM),true)
Shih-wei Liaod1fec812012-02-13 09:51:10 -080060LLVM_ROOT_PATH := external/llvm
61include $(LLVM_ROOT_PATH)/llvm.mk
62endif
63
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -080064# directory used for gtests on device
65ART_NATIVETEST_DIR := /data/nativetest/art
66ART_NATIVETEST_OUT := $(TARGET_OUT_DATA_NATIVE_TESTS)/art
67
Brian Carlstrom47a0d5a2011-10-12 21:20:05 -070068# directory used for tests on device
69ART_TEST_DIR := /data/art-test
70ART_TEST_OUT := $(TARGET_OUT_DATA)/art-test
71
Brian Carlstromcdc8de42011-07-19 14:23:17 -070072ART_CPP_EXTENSION := .cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -070073
Elliott Hughes0af55432011-08-17 18:37:28 -070074ART_C_INCLUDES := \
75 external/gtest/include \
76 external/icu4c/common \
77 external/icu4c/i18n \
Elliott Hughes8d768a92011-09-14 16:35:25 -070078 external/valgrind/dynamic_annotations \
buzbeec143c552011-08-20 17:38:58 -070079 external/zlib \
Elliott Hughesadb8c672012-03-06 16:49:32 -080080 art/src
Brian Carlstromb0460ea2011-07-29 10:08:05 -070081
Elliott Hughes1d3f1142011-09-13 12:00:00 -070082art_cflags := \
Ian Rogers646c3d72012-02-17 23:55:19 -080083 -O2 \
Carl Shapiro1fb86202011-06-27 17:43:13 -070084 -ggdb3 \
85 -Wall \
86 -Werror \
87 -Wextra \
Elliott Hugheseaa200d2012-01-05 16:30:31 -080088 -Wstrict-aliasing=3 \
Elliott Hughesf8349362012-06-18 15:00:06 -070089 -Wthread-safety \
Carl Shapiro1fb86202011-06-27 17:43:13 -070090 -fno-align-jumps \
91 -fstrict-aliasing
92
Brian Carlstrom69d7a6b2011-12-15 17:31:21 -080093ifeq ($(HOST_OS),linux)
Shih-wei Liao24782c62012-01-08 12:46:11 -080094 art_non_debug_cflags := \
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070095 -Wframe-larger-than=1728
Brian Carlstrom69d7a6b2011-12-15 17:31:21 -080096endif
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070097
98art_debug_cflags := \
Elliott Hughes06e3ad42012-02-07 14:51:57 -080099 -DDYNAMIC_ANNOTATIONS_ENABLED=1 \
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700100 -UNDEBUG
101
Elliott Hughes1d3f1142011-09-13 12:00:00 -0700102ART_HOST_CFLAGS := $(art_cflags) -DANDROID_SMP=1
Elliott Hughesf8349362012-06-18 15:00:06 -0700103# The host GCC isn't necessarily new enough to support -Wthread-safety (GCC 4.4).
104ART_HOST_CFLAGS := $(filter-out -Wthread-safety,$(ART_HOST_CFLAGS))
Elliott Hughes1d3f1142011-09-13 12:00:00 -0700105
Logan Chien08e1ba32012-05-08 15:08:51 +0800106ART_TARGET_CFLAGS := $(art_cflags) -DART_TARGET
Elliott Hughes1d3f1142011-09-13 12:00:00 -0700107ifeq ($(TARGET_CPU_SMP),true)
108 ART_TARGET_CFLAGS += -DANDROID_SMP=1
109else
110 ART_TARGET_CFLAGS += -DANDROID_SMP=0
111endif
112
Brian Carlstrom89521892011-12-07 22:05:07 -0800113# To use oprofile_android --callgraph, uncomment this and recompile with "mmm art -B -j16"
114# ART_TARGET_CFLAGS += -fno-omit-frame-pointer -marm -mapcs
115
Elliott Hughes3b6baaa2011-10-14 19:13:56 -0700116ART_HOST_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
117ART_TARGET_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
118
Brian Carlstromfd2ec542012-05-02 15:08:57 -0700119# TODO: move -fkeep-inline-functions to art_debug_cflags when target gcc > 4.4 (and -lsupc++)
Elliott Hughes1ba27142012-01-20 15:32:00 -0800120ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags) -fkeep-inline-functions
Brian Carlstromfd2ec542012-05-02 15:08:57 -0700121ART_HOST_DEBUG_LDLIBS := -lsupc++
Elliott Hughesad6c9c32012-01-19 17:39:12 -0800122
123ifneq ($(HOST_OS),linux)
124 # Some Mac OS pthread header files are broken with -fkeep-inline-functions.
Elliott Hughes34cf5142012-01-20 16:39:13 -0800125 ART_HOST_DEBUG_CFLAGS := $(filter-out -fkeep-inline-functions,$(ART_HOST_DEBUG_CFLAGS))
Elliott Hughes60234562012-06-01 12:25:59 -0700126 # Mac OS doesn't have libsupc++.
127 ART_HOST_DEBUG_LDLIBS := $(filter-out -lsupc++,$(ART_HOST_DEBUG_LDLIBS))
Elliott Hughesad6c9c32012-01-19 17:39:12 -0800128endif
129
Brian Carlstrom86927212011-09-15 11:31:11 -0700130ART_TARGET_DEBUG_CFLAGS := $(art_debug_cflags)
Elliott Hughes1d3f1142011-09-13 12:00:00 -0700131
TDYa12758e63f92012-04-24 13:16:47 -0700132ifeq ($(ART_USE_LLVM_COMPILER),true)
133PARALLEL_ART_COMPILE_JOBS := -j8
134endif
135
Brian Carlstrom69b15fb2011-09-03 12:25:21 -0700136DEX2OAT_SRC_FILES := \
137 src/dex2oat.cc
138
Brian Carlstrom78128a62011-09-15 17:21:19 -0700139OATDUMP_SRC_FILES := \
Elliott Hughes3e778f72012-05-21 15:29:52 -0700140 src/oatdump.cc
Brian Carlstrom78128a62011-09-15 17:21:19 -0700141
Brian Carlstrom69b15fb2011-09-03 12:25:21 -0700142OATEXEC_SRC_FILES := \
143 src/oatexec.cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -0700144
Brian Carlstrom934486c2011-07-12 23:42:50 -0700145LIBART_COMMON_SRC_FILES := \
Elliott Hughes5ea047b2011-09-13 14:38:18 -0700146 src/atomic.cc.arm \
Ian Rogers5d76c432011-10-31 21:42:49 -0700147 src/card_table.cc \
Elliott Hughesa2501992011-08-26 19:39:54 -0700148 src/check_jni.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700149 src/class_linker.cc \
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700150 src/compiled_method.cc \
Brian Carlstrom9ea1cb12011-08-24 23:18:18 -0700151 src/compiler.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700152 src/debugger.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700153 src/dex_cache.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700154 src/dex_file.cc \
jeffhao10037c82012-01-23 15:06:23 -0800155 src/dex_file_verifier.cc \
Carl Shapiro12eb78e2011-06-24 14:51:06 -0700156 src/dex_instruction.cc \
Elliott Hughes3e778f72012-05-21 15:29:52 -0700157 src/disassembler.cc \
158 src/disassembler_arm.cc \
159 src/disassembler_mips.cc \
160 src/disassembler_x86.cc \
Ian Rogers30fab402012-01-23 15:43:46 -0800161 src/dlmalloc.c \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700162 src/file.cc \
163 src/file_linux.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700164 src/heap.cc \
Elliott Hughes5e71b522011-10-20 13:12:32 -0700165 src/heap_bitmap.cc \
Jesse Wilsonc4824e62011-11-01 14:39:04 -0400166 src/hprof/hprof.cc \
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700167 src/image.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700168 src/image_writer.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700169 src/indirect_reference_table.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700170 src/intern_table.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700171 src/jdwp/jdwp_event.cc \
172 src/jdwp/jdwp_expand_buf.cc \
173 src/jdwp/jdwp_handler.cc \
174 src/jdwp/jdwp_main.cc \
175 src/jdwp/jdwp_socket.cc \
Ian Rogersdf20fe02011-07-20 20:34:16 -0700176 src/jni_internal.cc \
Ian Rogers00f7d0e2012-07-19 15:28:27 -0700177 src/jobject_comparator.cc \
Elliott Hughes42ee1422011-09-06 12:33:32 -0700178 src/logging.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700179 src/mark_stack.cc \
180 src/mark_sweep.cc \
Brian Carlstrom27ec9612011-09-19 20:20:38 -0700181 src/mem_map.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700182 src/memory_region.cc \
Mathieu Chartierb43b7d42012-06-19 13:15:09 -0700183 src/mod_union_table.cc \
Elliott Hughes54e7df12011-09-16 11:47:04 -0700184 src/monitor.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700185 src/mutex.cc \
Ian Rogers0dae08e2012-04-14 13:55:11 -0700186 src/native/dalvik_system_DexFile.cc \
187 src/native/dalvik_system_VMDebug.cc \
188 src/native/dalvik_system_VMRuntime.cc \
189 src/native/dalvik_system_VMStack.cc \
190 src/native/dalvik_system_Zygote.cc \
191 src/native/java_lang_Class.cc \
192 src/native/java_lang_Object.cc \
193 src/native/java_lang_Runtime.cc \
194 src/native/java_lang_String.cc \
195 src/native/java_lang_System.cc \
196 src/native/java_lang_Thread.cc \
197 src/native/java_lang_Throwable.cc \
198 src/native/java_lang_VMClassLoader.cc \
199 src/native/java_lang_reflect_Array.cc \
200 src/native/java_lang_reflect_Constructor.cc \
201 src/native/java_lang_reflect_Field.cc \
202 src/native/java_lang_reflect_Method.cc \
203 src/native/java_lang_reflect_Proxy.cc \
204 src/native/java_util_concurrent_atomic_AtomicLong.cc \
205 src/native/org_apache_harmony_dalvik_ddmc_DdmServer.cc \
206 src/native/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \
207 src/native/sun_misc_Unsafe.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700208 src/oat/runtime/arm/stub_arm.cc \
209 src/oat/runtime/x86/stub_x86.cc \
210 src/oat/utils/arm/assembler_arm.cc \
211 src/oat/utils/arm/managed_register_arm.cc \
212 src/oat/utils/assembler.cc \
213 src/oat/utils/x86/assembler_x86.cc \
214 src/oat/utils/x86/managed_register_x86.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700215 src/oat.cc \
216 src/oat_file.cc \
217 src/oat_writer.cc \
Carl Shapiro3ee755d2011-06-28 12:11:04 -0700218 src/object.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700219 src/offsets.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700220 src/os_linux.cc \
Brian Carlstromae826982011-11-09 01:33:42 -0800221 src/primitive.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700222 src/reference_table.cc \
Elliott Hughes418d20f2011-09-22 14:00:39 -0700223 src/reflection.cc \
Carl Shapirod4e48fd2011-06-30 18:53:29 -0700224 src/runtime.cc \
Shih-wei Liaoa8a9c342012-03-03 22:35:16 -0800225 src/runtime_support.cc \
Elliott Hughese27955c2011-08-26 15:21:24 -0700226 src/signal_catcher.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700227 src/space.cc \
Mathieu Chartierb062fdd2012-07-03 09:51:48 -0700228 src/space_bitmap.cc \
Elliott Hughes68e76522011-10-05 13:22:16 -0700229 src/stack.cc \
Carl Shapirob5573532011-07-12 18:22:59 -0700230 src/stringpiece.cc \
Elliott Hugheseb4f6142011-07-15 17:43:51 -0700231 src/stringprintf.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700232 src/thread.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700233 src/thread_list.cc \
jeffhaoe343b762011-12-05 16:36:44 -0800234 src/trace.cc \
Elliott Hughes814e4032011-08-23 12:07:56 -0700235 src/utf.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700236 src/utils.cc \
Elliott Hugheseac76672012-05-24 21:56:51 -0700237 src/well_known_classes.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700238 src/zip_archive.cc \
239 src/verifier/gc_map.cc \
240 src/verifier/method_verifier.cc \
241 src/verifier/reg_type.cc \
242 src/verifier/reg_type_cache.cc \
243 src/verifier/register_line.cc
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700244
Shih-wei Liaod1fec812012-02-13 09:51:10 -0800245ifeq ($(ART_USE_LLVM_COMPILER),true)
246LIBART_COMMON_SRC_FILES += \
Logan Chienfca7e872011-12-20 20:08:22 +0800247 src/compiler_llvm/inferred_reg_category_map.cc \
Logan Chien67008a62012-06-06 18:23:12 +0800248 src/compiler_llvm/procedure_linkage_table.cc \
Logan Chien937105a2012-04-02 02:37:37 +0800249 src/compiler_llvm/runtime_support_llvm.cc
Shih-wei Liao6e94f142012-04-16 18:14:14 -0700250endif
251
Shih-wei Liaoe94d9b22012-05-22 09:01:24 -0700252ifeq ($(ART_USE_GREENLAND_COMPILER),true)
253LIBART_COMMON_SRC_FILES += \
254 src/greenland/inferred_reg_category_map.cc
255endif
256
Ian Rogers57b86d42012-03-27 16:05:41 -0700257LIBART_COMMON_SRC_FILES += \
Ian Rogers57b86d42012-03-27 16:05:41 -0700258 src/oat/runtime/context.cc \
259 src/oat/runtime/support_alloc.cc \
260 src/oat/runtime/support_cast.cc \
261 src/oat/runtime/support_debug.cc \
262 src/oat/runtime/support_dexcache.cc \
263 src/oat/runtime/support_field.cc \
264 src/oat/runtime/support_fillarray.cc \
265 src/oat/runtime/support_invoke.cc \
266 src/oat/runtime/support_jni.cc \
267 src/oat/runtime/support_locks.cc \
268 src/oat/runtime/support_math.cc \
269 src/oat/runtime/support_proxy.cc \
270 src/oat/runtime/support_stubs.cc \
271 src/oat/runtime/support_thread.cc \
272 src/oat/runtime/support_throw.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700273 src/oat/runtime/support_trace.cc
Shih-wei Liaod1fec812012-02-13 09:51:10 -0800274
Brian Carlstrom934486c2011-07-12 23:42:50 -0700275LIBART_TARGET_SRC_FILES := \
276 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700277 src/jdwp/jdwp_adb.cc \
Elliott Hughesffe67362011-07-17 12:09:27 -0700278 src/logging_android.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700279 src/monitor_android.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700280 src/runtime_android.cc \
Brian Carlstrom51477332012-03-25 20:20:26 -0700281 src/thread_android.cc
282
283ifeq ($(TARGET_ARCH),arm)
Ian Rogers57b86d42012-03-27 16:05:41 -0700284LIBART_TARGET_SRC_FILES += \
285 src/oat/runtime/arm/context_arm.cc.arm \
286 src/oat/runtime/arm/oat_support_entrypoints_arm.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700287 src/oat/runtime/arm/runtime_support_arm.S
Brian Carlstrom51477332012-03-25 20:20:26 -0700288else # TARGET_ARCH != arm
289ifeq ($(TARGET_ARCH),x86)
Ian Rogers57b86d42012-03-27 16:05:41 -0700290LIBART_TARGET_SRC_FILES += \
291 src/oat/runtime/x86/context_x86.cc \
292 src/oat/runtime/x86/oat_support_entrypoints_x86.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700293 src/oat/runtime/x86/runtime_support_x86.S
Brian Carlstrom51477332012-03-25 20:20:26 -0700294else # TARGET_ARCH != x86
295ifeq ($(TARGET_ARCH),mips)
Ian Rogers57b86d42012-03-27 16:05:41 -0700296LIBART_TARGET_SRC_FILES += \
297 src/oat/runtime/mips/oat_support_entrypoints_mips.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700298 src/oat/runtime/mips/runtime_support_mips.S
299else # TARGET_ARCH != mips
300$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
301endif # TARGET_ARCH != mips
302endif # TARGET_ARCH != x86
303endif # TARGET_ARCH != arm
Ian Rogers776ac1f2012-04-13 23:36:36 -0700304
305ifeq ($(TARGET_ARCH),arm)
306LIBART_TARGET_SRC_FILES += src/thread_arm.cc
307else # TARGET_ARCH != arm
308ifeq ($(TARGET_ARCH),x86)
309LIBART_TARGET_SRC_FILES += src/thread_x86.cc
310else # TARGET_ARCH != x86
311ifeq ($(TARGET_ARCH),mips)
312LIBART_TARGET_SRC_FILES += src/thread_mips.cc
Brian Carlstrom51477332012-03-25 20:20:26 -0700313else # TARGET_ARCH != mips
314$(error unsupported TARGET_ARCH=$(TARGET_ARCH))
315endif # TARGET_ARCH != mips
316endif # TARGET_ARCH != x86
317endif # TARGET_ARCH != arm
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700318
Brian Carlstrom934486c2011-07-12 23:42:50 -0700319LIBART_HOST_SRC_FILES := \
320 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughesffe67362011-07-17 12:09:27 -0700321 src/logging_linux.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700322 src/monitor_linux.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700323 src/runtime_linux.cc \
Brian Carlstrom51477332012-03-25 20:20:26 -0700324 src/thread_linux.cc
325
326ifeq ($(HOST_ARCH),x86)
Ian Rogers57b86d42012-03-27 16:05:41 -0700327LIBART_HOST_SRC_FILES += \
328 src/oat/runtime/x86/oat_support_entrypoints_x86.cc \
329 src/oat/runtime/x86/context_x86.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700330 src/oat/runtime/x86/runtime_support_x86.S
331else # HOST_ARCH != x86
332$(error unsupported HOST_ARCH=$(HOST_ARCH))
333endif # HOST_ARCH != x86
Ian Rogers776ac1f2012-04-13 23:36:36 -0700334
335ifeq ($(HOST_ARCH),x86)
336LIBART_HOST_SRC_FILES += src/thread_x86.cc
Brian Carlstrom51477332012-03-25 20:20:26 -0700337else # HOST_ARCH != x86
338$(error unsupported HOST_ARCH=$(HOST_ARCH))
339endif # HOST_ARCH != x86
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700340
Ian Rogers776ac1f2012-04-13 23:36:36 -0700341
Elliott Hughes0e57ccb2012-04-03 16:04:52 -0700342LIBART_ENUM_OPERATOR_OUT_HEADER_FILES := \
343 src/indirect_reference_table.h \
344 src/instruction_set.h \
345 src/invoke_type.h \
Elliott Hughes460384f2012-04-04 16:53:10 -0700346 src/jdwp/jdwp.h \
347 src/jdwp/jdwp_constants.h \
Elliott Hughes34e06962012-04-09 13:55:55 -0700348 src/mutex.h \
Elliott Hughes48257562012-06-06 17:42:44 -0700349 src/object.h \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700350 src/thread.h \
Mathieu Chartiercc236d72012-07-20 10:29:05 -0700351 src/space.h \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700352 src/verifier/method_verifier.h
Elliott Hughes0e57ccb2012-04-03 16:04:52 -0700353
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700354LIBARTTEST_COMMON_SRC_FILES := \
Shih-wei Liaoa6af3c32011-10-17 15:25:11 -0700355 test/StackWalk/stack_walk_jni.cc \
356 test/ReferenceMap/stack_walk_refmap_jni.cc
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700357
Brian Carlstrom934486c2011-07-12 23:42:50 -0700358TEST_COMMON_SRC_FILES := \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700359 src/class_linker_test.cc \
Brian Carlstromaded5f72011-10-07 17:15:04 -0700360 src/compiler_test.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700361 src/dex_cache_test.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700362 src/dex_file_test.cc \
363 src/dex_instruction_visitor_test.cc \
Shih-wei Liao2fb97532011-08-11 16:17:23 -0700364 src/exception_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700365 src/file_test.cc \
Brian Carlstrom4b2966b2012-05-22 08:54:52 -0700366 src/gtest_test.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -0700367 src/heap_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700368 src/image_test.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700369 src/indirect_reference_table_test.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700370 src/intern_table_test.cc \
Ian Rogerscd2764f2011-09-02 15:38:24 -0700371 src/jni_internal_test.cc \
372 src/jni_compiler_test.cc \
Ian Rogers57b86d42012-03-27 16:05:41 -0700373 src/oat/utils/arm/managed_register_arm_test.cc \
374 src/oat/utils/x86/managed_register_x86_test.cc \
Brian Carlstromcd74c4b2012-01-23 13:21:00 -0800375 src/mutex_test.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700376 src/oat_test.cc \
Carl Shapiro894d0fa2011-06-30 14:48:49 -0700377 src/object_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700378 src/reference_table_test.cc \
Logan Chien008fa512012-06-22 08:09:57 -0700379 src/runtime_support_test.cc \
Carl Shapirofc322c72011-07-27 00:20:01 -0700380 src/runtime_test.cc \
Mathieu Chartiercc236d72012-07-20 10:29:05 -0700381 src/space_bitmap_test.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700382 src/space_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700383 src/utils_test.cc \
Ian Rogers776ac1f2012-04-13 23:36:36 -0700384 src/zip_archive_test.cc \
385 src/verifier/method_verifier_test.cc \
386 src/verifier/reg_type_test.cc
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700387
Brian Carlstrom934486c2011-07-12 23:42:50 -0700388TEST_TARGET_SRC_FILES := \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700389 $(TEST_COMMON_SRC_FILES)
Carl Shapiro008e4122011-06-23 17:27:46 -0700390
Brian Carlstrom934486c2011-07-12 23:42:50 -0700391TEST_HOST_SRC_FILES := \
392 $(TEST_COMMON_SRC_FILES) \
Ian Rogers57b86d42012-03-27 16:05:41 -0700393 src/oat/utils/x86/assembler_x86_test.cc
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700394
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800395# subdirectories of test/ which are used as inputs for gtests
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700396TEST_DEX_DIRECTORIES := \
Shih-wei Liao303b01e2011-09-14 00:46:13 -0700397 AbstractMethod \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700398 AllFields \
Ian Rogers0571d352011-11-03 19:51:38 -0700399 CreateMethodSignature \
Brian Carlstrom33f741e2011-10-03 11:24:05 -0700400 ExceptionHandle \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700401 IntMath \
402 Interfaces \
403 Main \
404 MyClass \
405 MyClassNatives \
406 Nested \
Elliott Hughes77405792012-03-15 15:22:12 -0700407 NonStaticLeafMethods \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700408 ProtoCompare \
409 ProtoCompare2 \
410 StaticLeafMethods \
411 Statics \
jeffhaoabcfde32011-09-29 15:05:18 -0700412 StaticsFromCode \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700413 XandY
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700414
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800415# subdirectories of test/ which are used with test-art-target-oat
416# Declare the simplest tests (Main, HelloWorld, and Fibonacci) first, the rest are alphabetical
417TEST_OAT_DIRECTORIES := \
418 Main \
419 HelloWorld \
420 Fibonacci \
421 \
422 ExceptionTest \
423 GrowthLimit \
Mathieu Chartierbba47a42012-05-30 10:53:58 -0700424 ConcurrentGC \
Brian Carlstrom32b4b2a2012-01-31 16:21:40 -0800425 IntMath \
426 Invoke \
427 MemUsage \
428 ParallelGC \
429 ReferenceMap \
430 ReflectionTest \
431 StackWalk \
432 ThreadStress
433
434# TODO: Enable when the StackWalk2 tests are passing
435# StackWalk2 \
436
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700437ART_BUILD_TARGET := false
438ART_BUILD_HOST := false
439ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
440 ART_BUILD_TARGET := true
441endif
442ifeq ($(ART_BUILD_TARGET_DEBUG),true)
443 ART_BUILD_TARGET := true
444endif
445ifeq ($(ART_BUILD_HOST_NDEBUG),true)
446 ART_BUILD_HOST := true
447endif
448ifeq ($(ART_BUILD_HOST_DEBUG),true)
449 ART_BUILD_HOST := true
450endif