1#
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
19include art/build/Android.common.mk
20
21dalvikvm_cflags := -Wall -Werror -Wextra -std=gnu++11
22
23include $(CLEAR_VARS)
24LOCAL_MODULE := dalvikvm
25LOCAL_MODULE_TAGS := optional
26LOCAL_CPP_EXTENSION := cc
27LOCAL_SRC_FILES := dalvikvm.cc
28LOCAL_CFLAGS := $(dalvikvm_cflags)
29LOCAL_C_INCLUDES := art/runtime
30LOCAL_SHARED_LIBRARIES := libdl liblog libnativehelper
31LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
32LOCAL_LDFLAGS := -Wl,--version-script,art/sigchainlib/version-script.txt -Wl,--export-dynamic
33LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
34LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.common.mk
35LOCAL_MULTILIB := both
36LOCAL_MODULE_STEM_32 := dalvikvm32
37LOCAL_MODULE_STEM_64 := dalvikvm64
38include external/libcxx/libcxx.mk
39include $(BUILD_EXECUTABLE)
40
41# Create symlink for the primary version target.
42include  $(BUILD_SYSTEM)/executable_prefer_symlink.mk
43
44ART_TARGET_EXECUTABLES += $(TARGET_OUT_EXECUTABLES)/$(LOCAL_MODULE)
45ART_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
49
50include $(CLEAR_VARS)
51LOCAL_MODULE := dalvikvm
52LOCAL_MODULE_TAGS := optional
53LOCAL_CLANG := true
54LOCAL_CPP_EXTENSION := cc
55LOCAL_SRC_FILES := dalvikvm.cc
56LOCAL_CFLAGS := $(dalvikvm_cflags)
57LOCAL_C_INCLUDES := art/runtime
58LOCAL_SHARED_LIBRARIES := libnativehelper
59LOCAL_WHOLE_STATIC_LIBRARIES := libsigchain
60LOCAL_LDFLAGS := -ldl -lpthread
61# Mac OS linker doesn't understand --export-dynamic.
62ifneq ($(HOST_OS),darwin)
63  LOCAL_LDFLAGS += -Wl,--export-dynamic
64endif
65LOCAL_ADDITIONAL_DEPENDENCIES += $(LOCAL_PATH)/Android.mk
66LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.common.mk
67LOCAL_IS_HOST_MODULE := true
68LOCAL_MULTILIB := both
69LOCAL_MODULE_STEM_32 := dalvikvm32
70LOCAL_MODULE_STEM_64 := dalvikvm64
71include external/libcxx/libcxx.mk
72include $(BUILD_HOST_EXECUTABLE)
73
74# Create symlink for the primary version target.
75include  $(BUILD_SYSTEM)/executable_prefer_symlink.mk
76
77ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE)
78ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(ART_PHONY_TEST_HOST_SUFFIX)
79ifdef 2ND_ART_PHONY_TEST_HOST_SUFFIX
80  ART_HOST_EXECUTABLES += $(HOST_OUT_EXECUTABLES)/$(LOCAL_MODULE)$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
81endif
82