Android.mk revision 0e023432b369854b41619231b5d752baf5754ce2
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 16LOCAL_PATH := $(call my-dir) 17 18# 19# Common definitions for host and device. 20# 21 22src_files := \ 23 JNIHelp.c \ 24 Register.c 25 26c_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 33shared_libraries := \ 34 libexpat \ 35 libssl \ 36 libutils \ 37 libz \ 38 libcrypto \ 39 libicudata \ 40 libicuuc \ 41 libicui18n \ 42 libsqlite 43 44static_libraries := \ 45 libjavacore \ 46 libfdlibm 47 48 49 50# 51# Build for the target (device). 52# 53 54include $(CLEAR_VARS) 55 56LOCAL_SRC_FILES := $(src_files) 57LOCAL_C_INCLUDES := $(c_includes) 58LOCAL_STATIC_LIBRARIES := $(static_libraries) 59LOCAL_SHARED_LIBRARIES := $(shared_libraries) 60 61# liblog and libcutils are shared for target. 62LOCAL_SHARED_LIBRARIES += \ 63 liblog libcutils 64 65LOCAL_MODULE := libnativehelper 66 67include $(BUILD_SHARED_LIBRARY) 68 69 70# 71# Build for the host. 72# 73 74ifeq ($(WITH_HOST_DALVIK),true) 75 76 include $(CLEAR_VARS) 77 78 LOCAL_SRC_FILES := $(src_files) 79 LOCAL_C_INCLUDES := $(c_includes) 80 LOCAL_STATIC_LIBRARIES := $(static_libraries) 81 82 ifeq ($(HOST_OS)-$(HOST_ARCH),darwin-x86) 83 # OSX has a lot of libraries built in, which we don't have to 84 # bother building; just include them on the ld line. 85 LOCAL_LDLIBS := -lexpat -lssl -lz -lcrypto -licucore -lsqlite3 86 LOCAL_STATIC_LIBRARIES += libutils 87 else 88 LOCAL_SHARED_LIBRARIES := $(shared_libraries) 89 endif 90 91 # liblog and libcutils are static for host. 92 LOCAL_STATIC_LIBRARIES += \ 93 liblog libcutils 94 95 LOCAL_MODULE := libnativehelper-host 96 97 include $(BUILD_HOST_STATIC_LIBRARY) 98 99endif 100