OSDN Git Service

am dd19f5b9: Merge "Fix for a crash when GC weak references."
[android-x86/dalvik.git] / dalvikvm / 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 LOCAL_PATH:= $(call my-dir)
17
18 #
19 # Common definitions.
20 #
21
22 dalvikvm_src_files := \
23     Main.c
24
25 dalvikvm_c_includes := \
26     $(JNI_H_INCLUDE) \
27     dalvik/include
28
29
30 #
31 # Build for the target (device).
32 #
33
34 include $(CLEAR_VARS)
35
36 LOCAL_SRC_FILES := $(dalvikvm_src_files)
37 LOCAL_C_INCLUDES := $(dalvikvm_c_includes)
38
39 LOCAL_SHARED_LIBRARIES := \
40     libdvm \
41     libssl \
42     libz
43
44 LOCAL_MODULE_TAGS := optional
45 LOCAL_MODULE := dalvikvm
46
47 include $(BUILD_EXECUTABLE)
48
49
50 #
51 # Build for the host.
52 #
53
54 ifeq ($(WITH_HOST_DALVIK),true)
55
56     include $(CLEAR_VARS)
57     LOCAL_SRC_FILES := $(dalvikvm_src_files)
58     LOCAL_C_INCLUDES := $(dalvikvm_c_includes)
59
60     ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86)
61         # OS X comes with all these libraries, so there is no need
62         # to build any of them. Note: OpenSSL consists of libssl
63         # and libcrypto.
64         LOCAL_LDLIBS := -lffi -lssl -lcrypto -lz -lsqlite3
65     else
66         LOCAL_LDLIBS += -ldl -lpthread
67         LOCAL_SHARED_LIBRARIES += libdvm libcrypto libicuuc libicui18n libssl
68     endif
69
70     LOCAL_MODULE_TAGS := optional
71     LOCAL_MODULE := dalvikvm
72
73     include $(BUILD_HOST_EXECUTABLE)
74
75 endif