OSDN Git Service

Support dalvikvm on a Linux x86 host
[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 := dalvikvm
45
46 include $(BUILD_EXECUTABLE)
47
48
49 #
50 # Build for the host.
51 #
52
53 ifeq ($(WITH_HOST_DALVIK),true)
54
55     include $(CLEAR_VARS)
56     LOCAL_SRC_FILES := $(dalvikvm_src_files)
57     LOCAL_C_INCLUDES := $(dalvikvm_c_includes)
58
59     ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86)
60         # OS X comes with all these libraries, so there is no need
61         # to build any of them. Note: OpenSSL consists of libssl
62         # and libcrypto.
63         LOCAL_LDLIBS := -lffi -lssl -lcrypto -lz -lsqlite3
64     else
65         LOCAL_LDLIBS += -ldl -lpthread
66         LOCAL_SHARED_LIBRARIES += libdvm libcrypto libicuuc libicui18n libssl
67 #        LOCAL_STATIC_LIBRARIES += libcutils liblog libdex libexpat libnativehelper libutils libz
68     endif
69
70     LOCAL_MODULE := dalvikvm
71
72     include $(BUILD_HOST_EXECUTABLE)
73
74 endif