blob: 481fbc051e468a488ea9b6e7d10a5ded768ce9a8 [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 Carlstromcdc8de42011-07-19 14:23:17 -070017ART_CPP_EXTENSION := .cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -070018
Elliott Hughes0af55432011-08-17 18:37:28 -070019ART_C_INCLUDES := \
20 external/gtest/include \
21 external/icu4c/common \
22 external/icu4c/i18n \
Elliott Hughes8d768a92011-09-14 16:35:25 -070023 external/valgrind/dynamic_annotations \
buzbeec143c552011-08-20 17:38:58 -070024 external/zlib \
25 art/src \
26 dalvik/libdex
Brian Carlstromb0460ea2011-07-29 10:08:05 -070027
Elliott Hughes1d3f1142011-09-13 12:00:00 -070028art_cflags := \
Elliott Hughes7f40ffc2011-09-04 10:50:01 -070029 -O2 \
Carl Shapiro1fb86202011-06-27 17:43:13 -070030 -ggdb3 \
31 -Wall \
32 -Werror \
33 -Wextra \
34 -Wno-unused-parameter \
Carl Shapiro1fb86202011-06-27 17:43:13 -070035 -Wstrict-aliasing=2 \
36 -fno-align-jumps \
37 -fstrict-aliasing
38
Elliott Hughes1d3f1142011-09-13 12:00:00 -070039ART_HOST_CFLAGS := $(art_cflags) -DANDROID_SMP=1
40
41ART_TARGET_CFLAGS := $(art_cflags)
42ifeq ($(TARGET_CPU_SMP),true)
43 ART_TARGET_CFLAGS += -DANDROID_SMP=1
44else
45 ART_TARGET_CFLAGS += -DANDROID_SMP=0
46endif
47
Brian Carlstrom86927212011-09-15 11:31:11 -070048art_debug_cflags := -UNDEBUG
49# TODO: move -fkeep-inline-functions to art_debug_cflags when target gcc > 4.4
50ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags) -fkeep-inline-functions
51ART_TARGET_DEBUG_CFLAGS := $(art_debug_cflags)
Elliott Hughes1d3f1142011-09-13 12:00:00 -070052
Brian Carlstrom69b15fb2011-09-03 12:25:21 -070053DEX2OAT_SRC_FILES := \
54 src/dex2oat.cc
55
Brian Carlstrom78128a62011-09-15 17:21:19 -070056OATDUMP_SRC_FILES := \
57 src/oatdump.cc
58
Brian Carlstrom69b15fb2011-09-03 12:25:21 -070059OATEXEC_SRC_FILES := \
60 src/oatexec.cc
Carl Shapiro9bf84fd2011-06-17 17:05:25 -070061
Brian Carlstrom934486c2011-07-12 23:42:50 -070062LIBART_COMMON_SRC_FILES := \
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -070063 src/assembler.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -070064 src/assembler_arm.cc \
65 src/assembler_x86.cc \
Elliott Hughes5ea047b2011-09-13 14:38:18 -070066 src/atomic.cc.arm \
Ian Rogersb033c752011-07-20 12:22:35 -070067 src/calling_convention.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -070068 src/calling_convention_arm.cc \
69 src/calling_convention_x86.cc \
Ian Rogersbdb03912011-09-14 00:55:44 -070070 src/context.cc \
Elliott Hughes85d15452011-09-16 17:33:01 -070071 src/context_arm.cc.arm \
72 src/context_x86.cc \
Elliott Hughesa2501992011-08-26 19:39:54 -070073 src/check_jni.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -070074 src/class_linker.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -070075 src/class_loader.cc \
Brian Carlstrom9ea1cb12011-08-24 23:18:18 -070076 src/compiler.cc \
Brian Carlstrom2cc022b2011-08-25 10:05:39 -070077 src/compiler/Dataflow.cc \
78 src/compiler/Frontend.cc \
79 src/compiler/IntermediateRep.cc \
80 src/compiler/Ralloc.cc \
81 src/compiler/SSATransformation.cc \
82 src/compiler/Utility.cc \
83 src/compiler/codegen/RallocUtil.cc \
84 src/compiler/codegen/arm/ArchUtility.cc \
85 src/compiler/codegen/arm/ArmRallocUtil.cc \
86 src/compiler/codegen/arm/Assemble.cc \
87 src/compiler/codegen/arm/LocalOptimizations.cc \
88 src/compiler/codegen/arm/armv7-a/Codegen.cc \
Brian Carlstromf91c8c32011-09-21 17:30:34 -070089 src/dalvik_system_DexFile.cc \
Elliott Hughes01158d72011-09-19 19:47:10 -070090 src/dalvik_system_VMDebug.cc \
Elliott Hughes7ede61e2011-09-14 18:18:06 -070091 src/dalvik_system_VMRuntime.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -070092 src/dalvik_system_VMStack.cc \
Elliott Hughes01158d72011-09-19 19:47:10 -070093 src/dalvik_system_Zygote.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -070094 src/dex_cache.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -070095 src/dex_file.cc \
Carl Shapiro12eb78e2011-06-24 14:51:06 -070096 src/dex_instruction.cc \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -070097 src/dex_verifier.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -070098 src/file.cc \
99 src/file_linux.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700100 src/heap.cc \
Brian Carlstrom4a289ed2011-08-16 17:17:49 -0700101 src/image.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700102 src/image_writer.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700103 src/indirect_reference_table.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700104 src/intern_table.cc \
Elliott Hughesd369bb72011-09-12 14:41:14 -0700105 src/java_lang_Class.cc \
Elliott Hughesbf86d042011-08-31 17:53:14 -0700106 src/java_lang_Object.cc \
107 src/java_lang_Runtime.cc \
108 src/java_lang_String.cc \
109 src/java_lang_System.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700110 src/java_lang_Thread.cc \
Elliott Hughes1240dad2011-09-09 16:24:50 -0700111 src/java_lang_Throwable.cc \
Elliott Hughes64bf5a32011-09-20 14:43:12 -0700112 src/java_lang_VMClassLoader.cc \
Brian Carlstrom5b8e4c82011-09-18 01:38:59 -0700113 src/java_lang_reflect_Array.cc \
Elliott Hughes2a20cfd2011-09-23 19:30:41 -0700114 src/java_lang_reflect_Constructor.cc \
Brian Carlstromf867b6f2011-09-16 12:17:25 -0700115 src/java_lang_reflect_Field.cc \
116 src/java_lang_reflect_Method.cc \
Elliott Hughesbf86d042011-08-31 17:53:14 -0700117 src/java_util_concurrent_atomic_AtomicLong.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700118 src/jni_compiler.cc \
Ian Rogersdf20fe02011-07-20 20:34:16 -0700119 src/jni_internal.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700120 src/jni_internal_arm.cc \
121 src/jni_internal_x86.cc \
Elliott Hughes42ee1422011-09-06 12:33:32 -0700122 src/logging.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700123 src/mark_stack.cc \
124 src/mark_sweep.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700125 src/managed_register_arm.cc \
126 src/managed_register_x86.cc \
Brian Carlstrom27ec9612011-09-19 20:20:38 -0700127 src/mem_map.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700128 src/memory_region.cc \
Elliott Hughes54e7df12011-09-16 11:47:04 -0700129 src/monitor.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700130 src/mspace.c \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700131 src/mutex.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700132 src/oat.cc \
133 src/oat_file.cc \
134 src/oat_writer.cc \
Carl Shapiro3ee755d2011-06-28 12:11:04 -0700135 src/object.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700136 src/object_bitmap.cc \
137 src/offsets.cc \
Brian Carlstrom395520e2011-09-25 19:35:00 -0700138 src/org_apache_harmony_dalvik_ddmc_DdmServer.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700139 src/os_linux.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700140 src/reference_table.cc \
Elliott Hughes418d20f2011-09-22 14:00:39 -0700141 src/reflection.cc \
Carl Shapirod4e48fd2011-06-30 18:53:29 -0700142 src/runtime.cc \
Elliott Hughese27955c2011-08-26 15:21:24 -0700143 src/signal_catcher.cc \
Carl Shapiro69759ea2011-07-21 18:13:35 -0700144 src/space.cc \
Carl Shapirob5573532011-07-12 18:22:59 -0700145 src/stringpiece.cc \
Elliott Hugheseb4f6142011-07-15 17:43:51 -0700146 src/stringprintf.cc \
Shih-wei Liao31384c52011-09-06 15:27:45 -0700147 src/stub_arm.cc \
148 src/stub_x86.cc \
Elliott Hughes5ee7a8b2011-09-13 16:40:07 -0700149 src/sun_misc_Unsafe.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700150 src/thread.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700151 src/thread_list.cc \
Shih-wei Liao2d831012011-09-28 22:06:53 -0700152 src/runtime_support.cc \
Elliott Hughes814e4032011-08-23 12:07:56 -0700153 src/utf.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700154 src/utils.cc \
buzbee54330722011-08-23 16:46:55 -0700155 src/zip_archive.cc \
Shih-wei Liao2d831012011-09-28 22:06:53 -0700156 src/runtime_support_asm.S
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700157
Brian Carlstrom934486c2011-07-12 23:42:50 -0700158LIBART_TARGET_SRC_FILES := \
159 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughesffe67362011-07-17 12:09:27 -0700160 src/logging_android.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700161 src/runtime_android.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700162 src/thread_android.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700163 src/thread_arm.cc
Carl Shapiroa5d5cfd2011-06-21 12:46:59 -0700164
Brian Carlstrom934486c2011-07-12 23:42:50 -0700165LIBART_HOST_SRC_FILES := \
166 $(LIBART_COMMON_SRC_FILES) \
Elliott Hughesffe67362011-07-17 12:09:27 -0700167 src/logging_linux.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700168 src/runtime_linux.cc \
Elliott Hughes8daa0922011-09-11 13:46:25 -0700169 src/thread_linux.cc \
Ian Rogersb033c752011-07-20 12:22:35 -0700170 src/thread_x86.cc
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700171
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700172LIBARTTEST_COMMON_SRC_FILES := \
Shih-wei Liao31384c52011-09-06 15:27:45 -0700173 src/base64.cc \
Shih-wei Liao9407c602011-09-16 10:36:43 -0700174 src/jni_tests.cc \
175 src/stack_walk.cc
Brian Carlstromcdc8de42011-07-19 14:23:17 -0700176
Brian Carlstrom934486c2011-07-12 23:42:50 -0700177TEST_COMMON_SRC_FILES := \
Carl Shapiro0e5d75d2011-07-06 18:28:37 -0700178 src/class_linker_test.cc \
Brian Carlstrom7e49dca2011-07-22 18:07:34 -0700179 src/dex_cache_test.cc \
Carl Shapiro1fb86202011-06-27 17:43:13 -0700180 src/dex_file_test.cc \
181 src/dex_instruction_visitor_test.cc \
jeffhaoba5ebb92011-08-25 17:24:37 -0700182 src/dex_verifier_test.cc \
Shih-wei Liao2fb97532011-08-11 16:17:23 -0700183 src/exception_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700184 src/file_test.cc \
Brian Carlstrom1f870082011-08-23 16:02:11 -0700185 src/heap_test.cc \
Brian Carlstromdb4d5402011-08-09 12:18:28 -0700186 src/image_test.cc \
Elliott Hughes6c1a3942011-08-17 15:00:06 -0700187 src/indirect_reference_table_test.cc \
Brian Carlstrom7e93b502011-08-04 14:16:22 -0700188 src/intern_table_test.cc \
Ian Rogerscd2764f2011-09-02 15:38:24 -0700189 src/jni_internal_test.cc \
190 src/jni_compiler_test.cc \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700191 src/managed_register_arm_test.cc \
192 src/managed_register_x86_test.cc \
Brian Carlstrome24fa612011-09-29 00:53:55 -0700193 src/oat_test.cc \
Carl Shapiro894d0fa2011-06-30 14:48:49 -0700194 src/object_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700195 src/reference_table_test.cc \
Carl Shapirofc322c72011-07-27 00:20:01 -0700196 src/runtime_test.cc \
Brian Carlstromb0460ea2011-07-29 10:08:05 -0700197 src/space_test.cc \
Elliott Hughes11e45072011-08-16 17:40:46 -0700198 src/utils_test.cc \
buzbeec143c552011-08-20 17:38:58 -0700199 src/zip_archive_test.cc \
200 src/compiler_test.cc
Jesse Wilsonc981ace2011-06-22 14:17:14 -0700201
Brian Carlstrom934486c2011-07-12 23:42:50 -0700202TEST_TARGET_SRC_FILES := \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700203 $(TEST_COMMON_SRC_FILES)
Carl Shapiro008e4122011-06-23 17:27:46 -0700204
Brian Carlstrom934486c2011-07-12 23:42:50 -0700205TEST_HOST_SRC_FILES := \
206 $(TEST_COMMON_SRC_FILES) \
Ian Rogers2c8f6532011-09-02 17:16:34 -0700207 src/assembler_x86_test.cc
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700208
209# subdirectories of test/
210TEST_DEX_DIRECTORIES := \
Shih-wei Liao303b01e2011-09-14 00:46:13 -0700211 AbstractMethod \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700212 AllFields \
213 CreateMethodDescriptor \
buzbee43a36422011-09-14 14:00:13 -0700214 ExceptionTest \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700215 Fibonacci \
Brian Carlstrom69b15fb2011-09-03 12:25:21 -0700216 HelloWorld \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700217 IntMath \
218 Interfaces \
219 Main \
Shih-wei Liao8ab83282011-09-25 00:05:53 -0700220 MemUsage \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700221 MyClass \
222 MyClassNatives \
223 Nested \
224 ProtoCompare \
225 ProtoCompare2 \
Shih-wei Liao9407c602011-09-16 10:36:43 -0700226 StackWalk \
227 StackWalk2 \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700228 StaticLeafMethods \
229 Statics \
jeffhaoabcfde32011-09-29 15:05:18 -0700230 StaticsFromCode \
Elliott Hughes0f4c41d2011-09-04 14:58:03 -0700231 SystemMethods \
buzbee109bd6a2011-09-06 13:58:41 -0700232 Invoke \
Brian Carlstrom9f30b382011-08-28 22:41:38 -0700233 XandY
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700234
235ART_BUILD_TARGET := false
236ART_BUILD_HOST := false
237ifeq ($(ART_BUILD_TARGET_NDEBUG),true)
238 ART_BUILD_TARGET := true
239endif
240ifeq ($(ART_BUILD_TARGET_DEBUG),true)
241 ART_BUILD_TARGET := true
242endif
243ifeq ($(ART_BUILD_HOST_NDEBUG),true)
244 ART_BUILD_HOST := true
245endif
246ifeq ($(ART_BUILD_HOST_DEBUG),true)
247 ART_BUILD_HOST := true
248endif