OSDN Git Service

Merge change 24508 into eclair
[android-x86/dalvik.git] / vm / Android.mk
1 # Copyright (C) 2008 The Android Open Source Project
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15
16 #
17 # Android.mk for Dalvik VM.
18 #
19 # This makefile builds both for host and target, and so the very large
20 # swath of common definitions are factored out into a separate file to
21 # minimize duplication.
22 #
23 # Also, if you enable or disable optional features here (or Dvm.mk),
24 # rebuild the VM with "make clean-libdvm && make -j4 libdvm".
25 #
26
27 LOCAL_PATH:= $(call my-dir)
28
29 #
30 # Build for the target (device).
31 #
32
33 include $(CLEAR_VARS)
34
35 # Variables used in the included Dvm.mk.
36 dvm_os := $(TARGET_OS)
37 dvm_arch := $(TARGET_ARCH)
38 dvm_arch_variant := $(TARGET_ARCH_VARIANT)
39 dvm_simulator := $(TARGET_SIMULATOR)
40
41 include $(LOCAL_PATH)/Dvm.mk
42
43 # liblog and libcutils are shared for target.
44 LOCAL_SHARED_LIBRARIES += \
45         liblog libcutils
46
47 LOCAL_MODULE := libdvm
48
49 include $(BUILD_SHARED_LIBRARY)
50
51
52 #
53 # Build for the host.
54 #
55
56 ifeq ($(WITH_HOST_DALVIK),true)
57
58     include $(CLEAR_VARS)
59
60     # Variables used in the included Dvm.mk.
61     dvm_os := $(HOST_OS)
62     dvm_arch := $(HOST_ARCH)
63     dvm_arch_variant := $(HOST_ARCH_VARIANT)
64     dvm_simulator := false
65
66     include $(LOCAL_PATH)/Dvm.mk
67
68     # liblog and libcutils are static for host.
69     LOCAL_STATIC_LIBRARIES += \
70         liblog libcutils
71
72     # libffi is called libffi-host on the host. Similarly libnativehelper.
73     LOCAL_SHARED_LIBRARIES := \
74         $(patsubst libffi,libffi-host,$(LOCAL_SHARED_LIBRARIES))
75     LOCAL_SHARED_LIBRARIES := \
76         $(patsubst libnativehelper,libnativehelper-host,$(LOCAL_SHARED_LIBRARIES))
77
78     LOCAL_MODULE := libdvm-host
79
80     include $(BUILD_HOST_SHARED_LIBRARY)
81
82 endif