blob: a7f0037690936dc783feae1dc33d76c3512ed5b6 [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 Carlstrom47a0d5a2011-10-12 21:20:05 -070017# art-cache
18ART_CACHE_DIR := /data/art-cache
19ART_CACHE_OUT := $(TARGET_OUT_DATA)/art-cache
20
21# directory used for tests on device
22ART_TEST_DIR := /data/art-test
23ART_TEST_OUT := $(TARGET_OUT_DATA)/art-test
24
Brian Carlstromcdc8de42011-07-19 14:23:17 -070025ART_CPP_EXTENSION := .cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -070026
Elliott Hughes0af55432011-08-17 18:37:28 -070027ART_C_INCLUDES := \
28 external/gtest/include \
29 external/icu4c/common \
30 external/icu4c/i18n \
Elliott Hughes8d768a92011-09-14 16:35:25 -070031 external/valgrind/dynamic_annotations \
buzbeec143c552011-08-20 17:38:58 -070032 external/zlib \
33 art/src \
34 dalvik/libdex
Brian Carlstromb0460ea2011-07-29 10:08:05 -070035
Elliott Hughes1d3f1142011-09-13 12:00:00 -070036art_cflags := \
Elliott Hughes7f40ffc2011-09-04 10:50:01 -070037 -O2 \
Carl Shapiro1fb86202011-06-27 17:43:13 -070038 -ggdb3 \
39 -Wall \
40 -Werror \
41 -Wextra \
42 -Wno-unused-parameter \
Elliott Hugheseaa200d2012-01-05 16:30:31 -080043 -Wstrict-aliasing=3 \
Carl Shapiro1fb86202011-06-27 17:43:13 -070044 -fno-align-jumps \
45 -fstrict-aliasing
46
Brian Carlstrom69d7a6b2011-12-15 17:31:21 -080047ifeq ($(HOST_OS),linux)
Shih-wei Liao24782c62012-01-08 12:46:11 -080048 art_non_debug_cflags := \
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070049 -Wframe-larger-than=1728
Brian Carlstrom69d7a6b2011-12-15 17:31:21 -080050endif
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070051
52art_debug_cflags := \
53 -UNDEBUG
54
Elliott Hughes1d3f1142011-09-13 12:00:00 -070055ART_HOST_CFLAGS := $(art_cflags) -DANDROID_SMP=1
56
57ART_TARGET_CFLAGS := $(art_cflags)
58ifeq ($(TARGET_CPU_SMP),true)
59 ART_TARGET_CFLAGS += -DANDROID_SMP=1
60else
61 ART_TARGET_CFLAGS += -DANDROID_SMP=0
62endif
63
Brian Carlstrom89521892011-12-07 22:05:07 -080064# To use oprofile_android --callgraph, uncomment this and recompile with "mmm art -B -j16"
65# ART_TARGET_CFLAGS += -fno-omit-frame-pointer -marm -mapcs
66
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070067ART_HOST_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
68ART_TARGET_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
69
Brian Carlstrom86927212011-09-15 11:31:11 -070070# TODO: move -fkeep-inline-functions to art_debug_cflags when target gcc > 4.4
Elliott Hughes1ba27142012-01-20 15:32:00 -080071ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags) -fkeep-inline-functions
Elliott Hughesad6c9c32012-01-19 17:39:12 -080072
73ifneq ($(HOST_OS),linux)
74 # Some Mac OS pthread header files are broken with -fkeep-inline-functions.
Elliott Hughes34cf5142012-01-20 16:39:13 -080075 ART_HOST_DEBUG_CFLAGS := $(filter-out -fkeep-inline-functions,$(ART_HOST_DEBUG_CFLAGS))
Elliott Hughesad6c9c32012-01-19 17:39:12 -080076endif
77
Brian Carlstrom86927212011-09-15 11:31:11 -070078ART_TARGET_DEBUG_CFLAGS := $(art_debug_cflags)
Elliott Hughes1d3f1142011-09-13 12:00:00 -070079
Brian Carlstrom69b15fb2011-09-03 12:25:21 -070080DEX2OAT_SRC_FILES := \
81 src/dex2oat.cc
82
Brian Carlstrom78128a62011-09-15 17:21:19 -070083OATDUMP_SRC_FILES := \
84 src/oatdump.cc
85
Brian Carlstrom69b15fb2011-09-03 12:25:21 -070086OATEXEC_SRC_FILES := \
87 src/oatexec.cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -070088
Brian Carlstrom934486c2011-07-12 23:42:50 -070089LIBART_COMMON_SRC_FILES := \
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -070090 src/assembler.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -070091 src/assembler_arm.cc \
92 src/assembler_x86.cc \
Elliott Hughes5ea047b2011-09-13 14:38:18 -070093 src/atomic.cc.arm \
Ian Rogersb033c752011-07-20 12:22:35 -070094 src/calling_convention.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -070095 src/calling_convention_arm.cc \
96 src/calling_convention_x86.cc \
Ian Rogers5d76c432011-10-31 21:42:49 -070097 src/card_table.cc \
Ian Rogersbdb03912011-09-14 00:55:44 -070098 src/context.cc \
Elliott Hughes85d15452011-09-16 17:33:01 -070099 src/context_arm.cc.arm \
100 src/context_x86.cc \
Elliott Hughesa2501992011-08-26 19:39:54 -0700101 src/check_jni.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700102 src/class_linker.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -0700103 src/class_loader.cc \
Brian Carlstrom3320cf42011-10-04 14:58:28 -0700104 src/compiled_method.cc \
Brian Carlstrom9ea1cb12011-08-24 23:18:18 -0700105 src/compiler.cc \
Brian Carlstrom2cc022b2011-08-25 10:05:39 -0700106 src/compiler/Dataflow.cc \
107 src/compiler/Frontend.cc \
108 src/compiler/IntermediateRep.cc \
109 src/compiler/Ralloc.cc \
110 src/compiler/SSATransformation.cc \
111 src/compiler/Utility.cc \
112 src/compiler/codegen/RallocUtil.cc \
113 src/compiler/codegen/arm/ArchUtility.cc \
114 src/compiler/codegen/arm/ArmRallocUtil.cc \
115 src/compiler/codegen/arm/Assemble.cc \
116 src/compiler/codegen/arm/LocalOptimizations.cc \
117 src/compiler/codegen/arm/armv7-a/Codegen.cc \
Brian Carlstromf91c8c32011-09-21 17:30:34 -0700118 src/dalvik_system_DexFile.cc \
Elliott Hughes01158d72011-09-19 19:47:10 -0700119 src/dalvik_system_VMDebug.cc \
Elliott Hughes7ede61e2011-09-14 18:18:06 -0700120 src/dalvik_system_VMRuntime.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700121 src/dalvik_system_VMStack.cc \
Elliott Hughes01158d72011-09-19 19:47:10 -0700122 src/dalvik_system_Zygote.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700123 src/debugger.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700124 src/dex_cache.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700125 src/dex_file.cc \
Carl Shapiro12eb78e2011-06-24 14:51:06 -0700126 src/dex_instruction.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700127 src/dex_verifier.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700128 src/file.cc \
129 src/file_linux.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700130 src/heap.cc \
Elliott Hughes5e71b522011-10-20 13:12:32 -0700131 src/heap_bitmap.cc \
Jesse Wilsonc4824e62011-11-01 14:39:04 -0400132 src/hprof/hprof.cc \
Jesse Wilson0c54ac12011-11-09 15:14:05 -0500133 src/hprof/hprof_record.cc \
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700134 src/image.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700135 src/image_writer.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700136 src/indirect_reference_table.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700137 src/intern_table.cc \
Elliott Hughesd369bb72011-09-12 14:41:14 -0700138 src/java_lang_Class.cc \
Elliott Hughesbf86d042011-08-31 17:53:14 -0700139 src/java_lang_Object.cc \
140 src/java_lang_Runtime.cc \
141 src/java_lang_String.cc \
142 src/java_lang_System.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700143 src/java_lang_Thread.cc \
Elliott Hughes1240dad2011-09-09 16:24:50 -0700144 src/java_lang_Throwable.cc \
Elliott Hughes64bf5a32011-09-20 14:43:12 -0700145 src/java_lang_VMClassLoader.cc \
Brian Carlstrom5b8e4c82011-09-18 01:38:59 -0700146 src/java_lang_reflect_Array.cc \
Elliott Hughes2a20cfd2011-09-23 19:30:41 -0700147 src/java_lang_reflect_Constructor.cc \
Brian Carlstromf867b6f2011-09-16 12:17:25 -0700148 src/java_lang_reflect_Field.cc \
149 src/java_lang_reflect_Method.cc \
Jesse Wilson95caa792011-10-12 18:14:17 -0400150 src/java_lang_reflect_Proxy.cc \
Elliott Hughesbf86d042011-08-31 17:53:14 -0700151 src/java_util_concurrent_atomic_AtomicLong.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700152 src/jdwp/jdwp_constants.cc \
153 src/jdwp/jdwp_event.cc \
154 src/jdwp/jdwp_expand_buf.cc \
155 src/jdwp/jdwp_handler.cc \
156 src/jdwp/jdwp_main.cc \
157 src/jdwp/jdwp_socket.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700158 src/jni_compiler.cc \
Ian Rogersdf20fe02011-07-20 20:34:16 -0700159 src/jni_internal.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700160 src/jni_internal_arm.cc \
161 src/jni_internal_x86.cc \
Elliott Hughes42ee1422011-09-06 12:33:32 -0700162 src/logging.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700163 src/mark_stack.cc \
164 src/mark_sweep.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700165 src/managed_register_arm.cc \
166 src/managed_register_x86.cc \
Brian Carlstrom27ec9612011-09-19 20:20:38 -0700167 src/mem_map.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700168 src/memory_region.cc \
Elliott Hughes54e7df12011-09-16 11:47:04 -0700169 src/monitor.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700170 src/mspace.c \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700171 src/mutex.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700172 src/oat.cc \
173 src/oat_file.cc \
174 src/oat_writer.cc \
Carl Shapiro3ee755d2011-06-28 12:11:04 -0700175 src/object.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700176 src/offsets.cc \
Brian Carlstrom395520e2011-09-25 19:35:00 -0700177 src/org_apache_harmony_dalvik_ddmc_DdmServer.cc \
Elliott Hughesf6a1e1e2011-10-25 16:28:04 -0700178 src/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700179 src/os_linux.cc \
Brian Carlstromae826982011-11-09 01:33:42 -0800180 src/primitive.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700181 src/reference_table.cc \
Elliott Hughes418d20f2011-09-22 14:00:39 -0700182 src/reflection.cc \
Carl Shapirod4e48fd2011-06-30 18:53:29 -0700183 src/runtime.cc \
Elliott Hughese27955c2011-08-26 15:21:24 -0700184 src/signal_catcher.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700185 src/space.cc \
Elliott Hughes68e76522011-10-05 13:22:16 -0700186 src/stack.cc \
Carl Shapirob5573532011-07-12 18:22:59 -0700187 src/stringpiece.cc \
Elliott Hugheseb4f6142011-07-15 17:43:51 -0700188 src/stringprintf.cc \
Shih-wei Liao31384c52011-09-06 15:27:45 -0700189 src/stub_arm.cc \
190 src/stub_x86.cc \
Elliott Hughes5ee7a8b2011-09-13 16:40:07 -0700191 src/sun_misc_Unsafe.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700192 src/thread.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700193 src/thread_list.cc \
jeffhaoe343b762011-12-05 16:36:44 -0800194 src/trace.cc \
Shih-wei Liao2d831012011-09-28 22:06:53 -0700195 src/runtime_support.cc \
Elliott Hughes814e4032011-08-23 12:07:56 -0700196 src/utf.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700197 src/utils.cc \
Elliott Hughes5c9f0b42011-12-15 18:15:46 -0800198 src/zip_archive.cc
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700199
Brian Carlstrom934486c2011-07-12 23:42:50 -0700200LIBART_TARGET_SRC_FILES := \
201 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700202 src/jdwp/jdwp_adb.cc \
Elliott Hughesffe67362011-07-17 12:09:27 -0700203 src/logging_android.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700204 src/monitor_android.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700205 src/runtime_android.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700206 src/thread_android.cc \
Elliott Hughes5c9f0b42011-12-15 18:15:46 -0800207 src/thread_arm.cc \
208 src/runtime_support_arm.S
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700209
Brian Carlstrom934486c2011-07-12 23:42:50 -0700210LIBART_HOST_SRC_FILES := \
211 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughesffe67362011-07-17 12:09:27 -0700212 src/logging_linux.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700213 src/monitor_linux.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700214 src/runtime_linux.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700215 src/thread_linux.cc \
Elliott Hughes5c9f0b42011-12-15 18:15:46 -0800216 src/thread_x86.cc \
217 src/runtime_support_x86.S
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700218
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700219LIBARTTEST_COMMON_SRC_FILES := \
Shih-wei Liao31384c52011-09-06 15:27:45 -0700220 src/base64.cc \
Shih-wei Liao9407c602011-09-16 10:36:43 -0700221 src/jni_tests.cc \
Shih-wei Liaoa6af3c32011-10-17 15:25:11 -0700222 test/StackWalk/stack_walk_jni.cc \
223 test/ReferenceMap/stack_walk_refmap_jni.cc
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700224
Brian Carlstrom934486c2011-07-12 23:42:50 -0700225TEST_COMMON_SRC_FILES := \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700226 src/class_linker_test.cc \
Brian Carlstromaded5f72011-10-07 17:15:04 -0700227 src/compiler_test.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700228 src/dex_cache_test.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700229 src/dex_file_test.cc \
230 src/dex_instruction_visitor_test.cc \
jeffhaoba5ebb92011-08-25 17:24:37 -0700231 src/dex_verifier_test.cc \
Shih-wei Liao2fb97532011-08-11 16:17:23 -0700232 src/exception_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700233 src/file_test.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -0700234 src/heap_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700235 src/image_test.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700236 src/indirect_reference_table_test.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700237 src/intern_table_test.cc \
Ian Rogerscd2764f2011-09-02 15:38:24 -0700238 src/jni_internal_test.cc \
239 src/jni_compiler_test.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700240 src/managed_register_arm_test.cc \
241 src/managed_register_x86_test.cc \
Brian Carlstromcd74c4b2012-01-23 13:21:00 -0800242 src/mutex_test.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700243 src/oat_test.cc \
Carl Shapiro894d0fa2011-06-30 14:48:49 -0700244 src/object_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700245 src/reference_table_test.cc \
Carl Shapirofc322c72011-07-27 00:20:01 -0700246 src/runtime_test.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700247 src/space_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700248 src/utils_test.cc \
Brian Carlstromaded5f72011-10-07 17:15:04 -0700249 src/zip_archive_test.cc
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700250
Brian Carlstrom934486c2011-07-12 23:42:50 -0700251TEST_TARGET_SRC_FILES := \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700252 $(TEST_COMMON_SRC_FILES)
Carl Shapiro008e4122011-06-23 17:27:46 -0700253
Brian Carlstrom934486c2011-07-12 23:42:50 -0700254TEST_HOST_SRC_FILES := \
255 $(TEST_COMMON_SRC_FILES) \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700256 src/assembler_x86_test.cc
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700257
258# subdirectories of test/
259TEST_DEX_DIRECTORIES := \
Shih-wei Liao303b01e2011-09-14 00:46:13 -0700260 AbstractMethod \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700261 AllFields \
Ian Rogers0571d352011-11-03 19:51:38 -0700262 CreateMethodSignature \
Brian Carlstrom33f741e2011-10-03 11:24:05 -0700263 ExceptionHandle \
buzbee43a36422011-09-14 14:00:13 -0700264 ExceptionTest \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700265 Fibonacci \
jeffhaoc1160702011-10-27 15:48:45 -0700266 GrowthLimit \
Brian Carlstrom69b15fb2011-09-03 12:25:21 -0700267 HelloWorld \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700268 IntMath \
269 Interfaces \
270 Main \
Shih-wei Liao8ab83282011-09-25 00:05:53 -0700271 MemUsage \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700272 MyClass \
273 MyClassNatives \
274 Nested \
Brian Carlstrom55621742011-10-17 00:41:56 -0700275 ParallelGC \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700276 ProtoCompare \
277 ProtoCompare2 \
Shih-wei Liao63433ba2011-10-15 18:40:39 -0700278 ReferenceMap \
Elliott Hughesfe9cf7a2012-01-09 18:18:25 -0800279 ReflectionTest \
Shih-wei Liao9407c602011-09-16 10:36:43 -0700280 StackWalk \
281 StackWalk2 \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700282 StaticLeafMethods \
283 Statics \
jeffhaoabcfde32011-09-29 15:05:18 -0700284 StaticsFromCode \
Brian Carlstrom7c6deaa2011-10-21 12:05:06 -0700285 ThreadStress \
buzbee109bd6a2011-09-06 13:58:41 -0700286 Invoke \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700287 XandY
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700288
289ART_BUILD_TARGET := false
290ART_BUILD_HOST := false
291ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
292 ART_BUILD_TARGET := true
293endif
294ifeq ($(ART_BUILD_TARGET_DEBUG),true)
295 ART_BUILD_TARGET := true
296endif
297ifeq ($(ART_BUILD_HOST_NDEBUG),true)
298 ART_BUILD_HOST := true
299endif
300ifeq ($(ART_BUILD_HOST_DEBUG),true)
301 ART_BUILD_HOST := true
302endif