blob: 33a4fb030a57ec50715e67c548f6965190b5438a [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 \
Carl Shapiro1fb86202011-06-27 17:43:13 -070043 -Wstrict-aliasing=2 \
44 -fno-align-jumps \
45 -fstrict-aliasing
46
Brian Carlstrom69d7a6b2011-12-15 17:31:21 -080047ifeq ($(HOST_OS),linux)
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070048art_non_debug_cflags := \
49 -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
Elliott Hughes3b6baaa2011-10-14 19:13:56 -070064ART_HOST_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
65ART_TARGET_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
66
Brian Carlstrom86927212011-09-15 11:31:11 -070067# TODO: move -fkeep-inline-functions to art_debug_cflags when target gcc > 4.4
68ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags) -fkeep-inline-functions
69ART_TARGET_DEBUG_CFLAGS := $(art_debug_cflags)
Elliott Hughes1d3f1142011-09-13 12:00:00 -070070
Brian Carlstrom69b15fb2011-09-03 12:25:21 -070071DEX2OAT_SRC_FILES := \
72 src/dex2oat.cc
73
Brian Carlstrom78128a62011-09-15 17:21:19 -070074OATDUMP_SRC_FILES := \
75 src/oatdump.cc
76
Brian Carlstrom69b15fb2011-09-03 12:25:21 -070077OATEXEC_SRC_FILES := \
78 src/oatexec.cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -070079
Brian Carlstromb7bbba42011-10-13 14:58:47 -070080OATOPT_SRC_FILES := \
81 src/oatopt.cc
82
Brian Carlstrom934486c2011-07-12 23:42:50 -070083LIBART_COMMON_SRC_FILES := \
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -070084 src/assembler.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -070085 src/assembler_arm.cc \
86 src/assembler_x86.cc \
Elliott Hughes5ea047b2011-09-13 14:38:18 -070087 src/atomic.cc.arm \
Ian Rogersb033c752011-07-20 12:22:35 -070088 src/calling_convention.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -070089 src/calling_convention_arm.cc \
90 src/calling_convention_x86.cc \
Ian Rogers5d76c432011-10-31 21:42:49 -070091 src/card_table.cc \
Ian Rogersbdb03912011-09-14 00:55:44 -070092 src/context.cc \
Elliott Hughes85d15452011-09-16 17:33:01 -070093 src/context_arm.cc.arm \
94 src/context_x86.cc \
Elliott Hughesa2501992011-08-26 19:39:54 -070095 src/check_jni.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -070096 src/class_linker.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -070097 src/class_loader.cc \
Brian Carlstrom3320cf42011-10-04 14:58:28 -070098 src/compiled_method.cc \
Brian Carlstrom9ea1cb12011-08-24 23:18:18 -070099 src/compiler.cc \
Brian Carlstrom2cc022b2011-08-25 10:05:39 -0700100 src/compiler/Dataflow.cc \
101 src/compiler/Frontend.cc \
102 src/compiler/IntermediateRep.cc \
103 src/compiler/Ralloc.cc \
104 src/compiler/SSATransformation.cc \
105 src/compiler/Utility.cc \
106 src/compiler/codegen/RallocUtil.cc \
107 src/compiler/codegen/arm/ArchUtility.cc \
108 src/compiler/codegen/arm/ArmRallocUtil.cc \
109 src/compiler/codegen/arm/Assemble.cc \
110 src/compiler/codegen/arm/LocalOptimizations.cc \
111 src/compiler/codegen/arm/armv7-a/Codegen.cc \
Brian Carlstromf91c8c32011-09-21 17:30:34 -0700112 src/dalvik_system_DexFile.cc \
Elliott Hughes01158d72011-09-19 19:47:10 -0700113 src/dalvik_system_VMDebug.cc \
Elliott Hughes7ede61e2011-09-14 18:18:06 -0700114 src/dalvik_system_VMRuntime.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700115 src/dalvik_system_VMStack.cc \
Elliott Hughes01158d72011-09-19 19:47:10 -0700116 src/dalvik_system_Zygote.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700117 src/debugger.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700118 src/dex_cache.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700119 src/dex_file.cc \
Carl Shapiro12eb78e2011-06-24 14:51:06 -0700120 src/dex_instruction.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700121 src/dex_verifier.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700122 src/file.cc \
123 src/file_linux.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700124 src/heap.cc \
Elliott Hughes5e71b522011-10-20 13:12:32 -0700125 src/heap_bitmap.cc \
Jesse Wilsonc4824e62011-11-01 14:39:04 -0400126 src/hprof/hprof.cc \
Jesse Wilson0c54ac12011-11-09 15:14:05 -0500127 src/hprof/hprof_record.cc \
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700128 src/image.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700129 src/image_writer.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700130 src/indirect_reference_table.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700131 src/intern_table.cc \
Elliott Hughesd369bb72011-09-12 14:41:14 -0700132 src/java_lang_Class.cc \
Elliott Hughesbf86d042011-08-31 17:53:14 -0700133 src/java_lang_Object.cc \
134 src/java_lang_Runtime.cc \
135 src/java_lang_String.cc \
136 src/java_lang_System.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700137 src/java_lang_Thread.cc \
Elliott Hughes1240dad2011-09-09 16:24:50 -0700138 src/java_lang_Throwable.cc \
Elliott Hughes64bf5a32011-09-20 14:43:12 -0700139 src/java_lang_VMClassLoader.cc \
Brian Carlstrom5b8e4c82011-09-18 01:38:59 -0700140 src/java_lang_reflect_Array.cc \
Elliott Hughes2a20cfd2011-09-23 19:30:41 -0700141 src/java_lang_reflect_Constructor.cc \
Brian Carlstromf867b6f2011-09-16 12:17:25 -0700142 src/java_lang_reflect_Field.cc \
143 src/java_lang_reflect_Method.cc \
Jesse Wilson95caa792011-10-12 18:14:17 -0400144 src/java_lang_reflect_Proxy.cc \
Elliott Hughesbf86d042011-08-31 17:53:14 -0700145 src/java_util_concurrent_atomic_AtomicLong.cc \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700146 src/jdwp/jdwp_constants.cc \
147 src/jdwp/jdwp_event.cc \
148 src/jdwp/jdwp_expand_buf.cc \
149 src/jdwp/jdwp_handler.cc \
150 src/jdwp/jdwp_main.cc \
151 src/jdwp/jdwp_socket.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700152 src/jni_compiler.cc \
Ian Rogersdf20fe02011-07-20 20:34:16 -0700153 src/jni_internal.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700154 src/jni_internal_arm.cc \
155 src/jni_internal_x86.cc \
Elliott Hughes42ee1422011-09-06 12:33:32 -0700156 src/logging.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700157 src/mark_stack.cc \
158 src/mark_sweep.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700159 src/managed_register_arm.cc \
160 src/managed_register_x86.cc \
Brian Carlstrom27ec9612011-09-19 20:20:38 -0700161 src/mem_map.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700162 src/memory_region.cc \
Elliott Hughes54e7df12011-09-16 11:47:04 -0700163 src/monitor.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700164 src/mspace.c \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700165 src/mutex.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700166 src/oat.cc \
167 src/oat_file.cc \
168 src/oat_writer.cc \
Carl Shapiro3ee755d2011-06-28 12:11:04 -0700169 src/object.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700170 src/offsets.cc \
Brian Carlstrom395520e2011-09-25 19:35:00 -0700171 src/org_apache_harmony_dalvik_ddmc_DdmServer.cc \
Elliott Hughesf6a1e1e2011-10-25 16:28:04 -0700172 src/org_apache_harmony_dalvik_ddmc_DdmVmInternal.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700173 src/os_linux.cc \
Brian Carlstromae826982011-11-09 01:33:42 -0800174 src/primitive.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700175 src/reference_table.cc \
Elliott Hughes418d20f2011-09-22 14:00:39 -0700176 src/reflection.cc \
Carl Shapirod4e48fd2011-06-30 18:53:29 -0700177 src/runtime.cc \
Elliott Hughese27955c2011-08-26 15:21:24 -0700178 src/signal_catcher.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700179 src/space.cc \
Elliott Hughes68e76522011-10-05 13:22:16 -0700180 src/stack.cc \
Carl Shapirob5573532011-07-12 18:22:59 -0700181 src/stringpiece.cc \
Elliott Hugheseb4f6142011-07-15 17:43:51 -0700182 src/stringprintf.cc \
Shih-wei Liao31384c52011-09-06 15:27:45 -0700183 src/stub_arm.cc \
184 src/stub_x86.cc \
Elliott Hughes5ee7a8b2011-09-13 16:40:07 -0700185 src/sun_misc_Unsafe.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700186 src/thread.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700187 src/thread_list.cc \
jeffhaoe343b762011-12-05 16:36:44 -0800188 src/trace.cc \
Shih-wei Liao2d831012011-09-28 22:06:53 -0700189 src/runtime_support.cc \
Elliott Hughes814e4032011-08-23 12:07:56 -0700190 src/utf.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700191 src/utils.cc \
Elliott Hughes5c9f0b42011-12-15 18:15:46 -0800192 src/zip_archive.cc
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700193
Brian Carlstrom934486c2011-07-12 23:42:50 -0700194LIBART_TARGET_SRC_FILES := \
195 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughes872d4ec2011-10-21 17:07:15 -0700196 src/jdwp/jdwp_adb.cc \
Elliott Hughesffe67362011-07-17 12:09:27 -0700197 src/logging_android.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700198 src/monitor_android.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700199 src/runtime_android.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700200 src/thread_android.cc \
Elliott Hughes5c9f0b42011-12-15 18:15:46 -0800201 src/thread_arm.cc \
202 src/runtime_support_arm.S
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700203
Brian Carlstrom934486c2011-07-12 23:42:50 -0700204LIBART_HOST_SRC_FILES := \
205 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughesffe67362011-07-17 12:09:27 -0700206 src/logging_linux.cc \
Elliott Hughesfc861622011-10-17 17:57:47 -0700207 src/monitor_linux.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700208 src/runtime_linux.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700209 src/thread_linux.cc \
Elliott Hughes5c9f0b42011-12-15 18:15:46 -0800210 src/thread_x86.cc \
211 src/runtime_support_x86.S
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700212
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700213LIBARTTEST_COMMON_SRC_FILES := \
Shih-wei Liao31384c52011-09-06 15:27:45 -0700214 src/base64.cc \
Shih-wei Liao9407c602011-09-16 10:36:43 -0700215 src/jni_tests.cc \
Shih-wei Liaoa6af3c32011-10-17 15:25:11 -0700216 test/StackWalk/stack_walk_jni.cc \
217 test/ReferenceMap/stack_walk_refmap_jni.cc
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700218
Brian Carlstrom934486c2011-07-12 23:42:50 -0700219TEST_COMMON_SRC_FILES := \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700220 src/class_linker_test.cc \
Brian Carlstromaded5f72011-10-07 17:15:04 -0700221 src/compiler_test.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700222 src/dex_cache_test.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700223 src/dex_file_test.cc \
224 src/dex_instruction_visitor_test.cc \
jeffhaoba5ebb92011-08-25 17:24:37 -0700225 src/dex_verifier_test.cc \
Shih-wei Liao2fb97532011-08-11 16:17:23 -0700226 src/exception_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700227 src/file_test.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -0700228 src/heap_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700229 src/image_test.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700230 src/indirect_reference_table_test.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700231 src/intern_table_test.cc \
Ian Rogerscd2764f2011-09-02 15:38:24 -0700232 src/jni_internal_test.cc \
233 src/jni_compiler_test.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700234 src/managed_register_arm_test.cc \
235 src/managed_register_x86_test.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700236 src/oat_test.cc \
Carl Shapiro894d0fa2011-06-30 14:48:49 -0700237 src/object_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700238 src/reference_table_test.cc \
Carl Shapirofc322c72011-07-27 00:20:01 -0700239 src/runtime_test.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700240 src/space_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700241 src/utils_test.cc \
Brian Carlstromaded5f72011-10-07 17:15:04 -0700242 src/zip_archive_test.cc
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700243
Brian Carlstrom934486c2011-07-12 23:42:50 -0700244TEST_TARGET_SRC_FILES := \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700245 $(TEST_COMMON_SRC_FILES)
Carl Shapiro008e4122011-06-23 17:27:46 -0700246
Brian Carlstrom934486c2011-07-12 23:42:50 -0700247TEST_HOST_SRC_FILES := \
248 $(TEST_COMMON_SRC_FILES) \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700249 src/assembler_x86_test.cc
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700250
251# subdirectories of test/
252TEST_DEX_DIRECTORIES := \
Shih-wei Liao303b01e2011-09-14 00:46:13 -0700253 AbstractMethod \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700254 AllFields \
Ian Rogers0571d352011-11-03 19:51:38 -0700255 CreateMethodSignature \
Brian Carlstrom33f741e2011-10-03 11:24:05 -0700256 ExceptionHandle \
buzbee43a36422011-09-14 14:00:13 -0700257 ExceptionTest \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700258 Fibonacci \
jeffhaoc1160702011-10-27 15:48:45 -0700259 GrowthLimit \
Brian Carlstrom69b15fb2011-09-03 12:25:21 -0700260 HelloWorld \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700261 IntMath \
262 Interfaces \
263 Main \
Shih-wei Liao8ab83282011-09-25 00:05:53 -0700264 MemUsage \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700265 MyClass \
266 MyClassNatives \
267 Nested \
Brian Carlstrom55621742011-10-17 00:41:56 -0700268 ParallelGC \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700269 ProtoCompare \
270 ProtoCompare2 \
Shih-wei Liao63433ba2011-10-15 18:40:39 -0700271 ReferenceMap \
Shih-wei Liao9407c602011-09-16 10:36:43 -0700272 StackWalk \
273 StackWalk2 \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700274 StaticLeafMethods \
275 Statics \
jeffhaoabcfde32011-09-29 15:05:18 -0700276 StaticsFromCode \
Elliott Hughes0f4c41d2011-09-04 14:58:03 -0700277 SystemMethods \
Brian Carlstrom7c6deaa2011-10-21 12:05:06 -0700278 ThreadStress \
buzbee109bd6a2011-09-06 13:58:41 -0700279 Invoke \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700280 XandY
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700281
282ART_BUILD_TARGET := false
283ART_BUILD_HOST := false
284ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
285 ART_BUILD_TARGET := true
286endif
287ifeq ($(ART_BUILD_TARGET_DEBUG),true)
288 ART_BUILD_TARGET := true
289endif
290ifeq ($(ART_BUILD_HOST_NDEBUG),true)
291 ART_BUILD_HOST := true
292endif
293ifeq ($(ART_BUILD_HOST_DEBUG),true)
294 ART_BUILD_HOST := true
295endif