OSDN Git Service

Merge "The ICU data is no longer compiled directly into the shared library." into...
[android-x86/dalvik.git] / libnativehelper / Android.mk
1 # Copyright (C) 2009 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 for host and device.
20 #
21
22 src_files := \
23         JNIHelp.c \
24         Register.c
25
26 c_includes := \
27         $(JNI_H_INCLUDE)
28
29 # Any shared/static libs required by libjavacore
30 # need to be mentioned here as well.
31 # TODO: fix this requirement
32
33 shared_libraries := \
34         libexpat \
35         libssl \
36         libutils \
37         libz \
38         libcrypto  \
39         libicuuc   \
40         libicui18n \
41         libsqlite
42
43 static_libraries := \
44         libjavacore \
45         libfdlibm
46
47
48
49 #
50 # Build for the target (device).
51 #
52
53 include $(CLEAR_VARS)
54
55 LOCAL_SRC_FILES := $(src_files)
56 LOCAL_C_INCLUDES := $(c_includes)
57 LOCAL_STATIC_LIBRARIES := $(static_libraries)
58 LOCAL_SHARED_LIBRARIES := $(shared_libraries)
59
60 # liblog and libcutils are shared for target.
61 LOCAL_SHARED_LIBRARIES += \
62         liblog libcutils
63
64 LOCAL_MODULE := libnativehelper
65
66 include $(BUILD_SHARED_LIBRARY)
67
68
69 #
70 # Build for the host.
71 #
72
73 ifeq ($(WITH_HOST_DALVIK),true)
74
75     include $(CLEAR_VARS)
76
77     LOCAL_SRC_FILES := $(src_files)
78     LOCAL_C_INCLUDES := $(c_includes)
79     LOCAL_WHOLE_STATIC_LIBRARIES := $(static_libraries:%=%-host)
80
81     ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86)
82         # OSX has a lot of libraries built in, which we don't have to
83         # bother building; just include them on the ld line.
84         LOCAL_LDLIBS := -lexpat -lssl -lz -lcrypto -licucore -lsqlite3
85         LOCAL_WHOLE_STATIC_LIBRARIES += libutils
86     else
87         LOCAL_SHARED_LIBRARIES := $(shared_libraries)
88     endif
89
90     # liblog and libcutils are static for host.
91     LOCAL_STATIC_LIBRARIES += \
92         liblog libcutils
93
94     LOCAL_MODULE := libnativehelper-host
95
96     include $(BUILD_HOST_STATIC_LIBRARY)
97
98 endif