blob: 71e9a283d631376140db09584f2fcb06b6e0cd98 [file] [log] [blame]
Brian Carlstromfa42b442013-06-17 12:53:45 -07001#
2# Copyright (C) 2013 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
17LOCAL_PATH := $(call my-dir)
18
Brian Carlstrom906c27d2014-06-29 15:03:29 -070019include art/build/Android.common.mk
20
Ian Rogers507dfdd2014-05-15 16:42:40 -070021dalvikvm_cflags := -Wall -Werror -Wextra -std=gnu++11
Elliott Hughes025218c2013-07-30 17:13:06 -070022
Brian Carlstromfa42b442013-06-17 12:53:45 -070023include $(CLEAR_VARS)
24LOCAL_MODULE := dalvikvm
25LOCAL_MODULE_TAGS := optional
26LOCAL_CPP_EXTENSION := cc
Dmitriy Ivanove49a4f62014-10-20 14:11:00 -070027LOCAL_SRC_FILES := dalvikvm.cc
Elliott Hughes025218c2013-07-30 17:13:06 -070028LOCAL_CFLAGS := $(dalvikvm_cflags)
Ian Rogers507dfdd2014-05-15 16:42:40 -070029LOCAL_C_INCLUDES := art/runtime
Dmitriy Ivanovf57874d2014-10-07 13:43:23 -070030LOCAL_SHARED_LIBRARIES := libdl liblog libnativehelper
Dmitriy Ivanove49a4f62014-10-20 14:11:00 -070031LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
Dmitriy Ivanov7de85ca2015-04-01 11:17:46 -070032LOCAL_LDFLAGS := -Wl,--export-dynamic
Brian Carlstromfa42b442013-06-17 12:53:45 -070033LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Brian Carlstrom906c27d2014-06-29 15:03:29 -070034LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.common.mk
Andreas Gampeafbaa1a2014-03-25 18:09:32 -070035LOCAL_MULTILIB := both
Yongqin Liu2bb44362014-05-13 17:51:47 +080036LOCAL_MODULE_STEM_32 := dalvikvm32
Andreas Gampeafbaa1a2014-03-25 18:09:32 -070037LOCAL_MODULE_STEM_64 := dalvikvm64
Dan Albert31fb2602014-09-30 22:10:10 -070038LOCAL_NATIVE_COVERAGE := $(ART_COVERAGE)
Brian Carlstromfa42b442013-06-17 12:53:45 -070039include $(BUILD_EXECUTABLE)
Yongqin Liu2bb44362014-05-13 17:51:47 +080040
Ian Rogersafd9acc2014-06-17 08:21:54 -070041# Create symlink for the primary version target.
Yongqin Liu2bb44362014-05-13 17:51:47 +080042include $(BUILD_SYSTEM)/executable_prefer_symlink.mk
43
Brian Carlstromfa50baa2013-08-02 01:00:27 -070044ART_TARGET_EXECUTABLES += $(TARGET_OUT_EXECUTABLES)/$(LOCAL_MODULE)
Brian Carlstrom906c27d2014-06-29 15:03:29 -070045ART_TARGET_EXECUTABLES += $(TARGET_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(ART_PHONY_TEST_TARGET_SUFFIX)
46ifdef 2ND_ART_PHONY_TEST_TARGET_SUFFIX
47 ART_TARGET_EXECUTABLES += $(TARGET_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
48endif
Brian Carlstromfa42b442013-06-17 12:53:45 -070049
50include $(CLEAR_VARS)
51LOCAL_MODULE := dalvikvm
52LOCAL_MODULE_TAGS := optional
Ian Rogers507dfdd2014-05-15 16:42:40 -070053LOCAL_CLANG := true
Brian Carlstromfa42b442013-06-17 12:53:45 -070054LOCAL_CPP_EXTENSION := cc
Dmitriy Ivanove49a4f62014-10-20 14:11:00 -070055LOCAL_SRC_FILES := dalvikvm.cc
Elliott Hughes025218c2013-07-30 17:13:06 -070056LOCAL_CFLAGS := $(dalvikvm_cflags)
Ian Rogers507dfdd2014-05-15 16:42:40 -070057LOCAL_C_INCLUDES := art/runtime
Brian Carlstromfa42b442013-06-17 12:53:45 -070058LOCAL_SHARED_LIBRARIES := libnativehelper
Dmitriy Ivanove49a4f62014-10-20 14:11:00 -070059LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
Dmitriy Ivanov1d74e572014-10-14 12:18:10 -070060LOCAL_LDFLAGS := -ldl -lpthread
61# Mac OS linker doesn't understand --export-dynamic.
62ifneq ($(HOST_OS),darwin)
63 LOCAL_LDFLAGS += -Wl,--export-dynamic
Dmitriy Ivanov1d74e572014-10-14 12:18:10 -070064endif
Brian Carlstrom906c27d2014-06-29 15:03:29 -070065LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
66LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.common.mk
Ian Rogersbd5ea6a2014-04-16 16:34:44 -070067LOCAL_IS_HOST_MODULE := true
Ian Rogersafd9acc2014-06-17 08:21:54 -070068LOCAL_MULTILIB := both
Ying Wang754a4452015-07-21 12:05:30 -070069ifdef ART_MULTILIB_OVERRIDE_host
70 LOCAL_MULTILIB := $(ART_MULTILIB_OVERRIDE_host)
71endif
72ifeq ($(LOCAL_MULTILIB),both)
Ian Rogersafd9acc2014-06-17 08:21:54 -070073LOCAL_MODULE_STEM_32 := dalvikvm32
74LOCAL_MODULE_STEM_64 := dalvikvm64
Ying Wang754a4452015-07-21 12:05:30 -070075endif
Dan Albert31fb2602014-09-30 22:10:10 -070076LOCAL_NATIVE_COVERAGE := $(ART_COVERAGE)
Brian Carlstromfa42b442013-06-17 12:53:45 -070077include $(BUILD_HOST_EXECUTABLE)
Ian Rogersa929ded2014-06-25 21:32:30 -070078# Create symlink for the primary version target.
Ying Wang754a4452015-07-21 12:05:30 -070079ifeq ($(LOCAL_MULTILIB),both)
Ian Rogersa929ded2014-06-25 21:32:30 -070080include $(BUILD_SYSTEM)/executable_prefer_symlink.mk
81
Brian Carlstrom906c27d2014-06-29 15:03:29 -070082ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(ART_PHONY_TEST_HOST_SUFFIX)
83ifdef 2ND_ART_PHONY_TEST_HOST_SUFFIX
84 ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
85endif
Ying Wang754a4452015-07-21 12:05:30 -070086endif
87ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE)