diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2009-11-12 18:45:15 -0800 |
|---|---|---|
| committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-12 18:45:15 -0800 |
| commit | 72e93344b4d1ffc71e9c832ec23de0657e5b04a5 (patch) | |
| tree | 1a08d1e43d54200ea737234d865c4668c5d3535b /libnativehelper | |
| parent | dfd0afbcb08b871e224a28ecb4ed427a7693545c (diff) | |
| download | android_dalvik-72e93344b4d1ffc71e9c832ec23de0657e5b04a5.tar.gz android_dalvik-72e93344b4d1ffc71e9c832ec23de0657e5b04a5.tar.bz2 android_dalvik-72e93344b4d1ffc71e9c832ec23de0657e5b04a5.zip | |
eclair snapshot
Diffstat (limited to 'libnativehelper')
| -rw-r--r-- | libnativehelper/Android.mk | 71 | ||||
| -rw-r--r-- | libnativehelper/include/nativehelper/JNIHelp.h | 2 |
2 files changed, 66 insertions, 7 deletions
diff --git a/libnativehelper/Android.mk b/libnativehelper/Android.mk index 5f553c5aa..aa4be86bd 100644 --- a/libnativehelper/Android.mk +++ b/libnativehelper/Android.mk @@ -1,20 +1,36 @@ +# Copyright (C) 2009 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + LOCAL_PATH := $(call my-dir) -include $(CLEAR_VARS) -LOCAL_SRC_FILES := \ +# +# Common definitions for host and device. +# + +src_files := \ JNIHelp.c \ Register.c -LOCAL_C_INCLUDES += \ +c_includes := \ $(JNI_H_INCLUDE) # Any shared/static libs required by libjavacore # need to be mentioned here as well. # TODO: fix this requirement -LOCAL_SHARED_LIBRARIES := \ - liblog \ - libcutils \ +shared_libraries := \ libexpat \ libssl \ libutils \ @@ -25,10 +41,51 @@ LOCAL_SHARED_LIBRARIES := \ libicui18n \ libsqlite -LOCAL_STATIC_LIBRARIES := \ +static_libraries := \ libjavacore \ libfdlibm + + +# +# Build for the target (device). +# + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := $(src_files) +LOCAL_C_INCLUDES := $(c_includes) +LOCAL_SHARED_LIBRARIES := $(shared_libraries) +LOCAL_STATIC_LIBRARIES := $(static_libraries) + +# liblog and libcutils are shared for target. +LOCAL_SHARED_LIBRARIES += \ + liblog libcutils + LOCAL_MODULE := libnativehelper include $(BUILD_SHARED_LIBRARY) + + +# +# Build for the host. +# + +ifeq ($(WITH_HOST_DALVIK),true) + + include $(CLEAR_VARS) + + LOCAL_SRC_FILES := $(src_files) + LOCAL_C_INCLUDES := $(c_includes) + LOCAL_SHARED_LIBRARIES := $(shared_libraries) + LOCAL_STATIC_LIBRARIES := $(static_libraries) + + # liblog and libcutils are static for host. + LOCAL_STATIC_LIBRARIES += \ + liblog libcutils + + LOCAL_MODULE := libnativehelper-host + + include $(BUILD_HOST_SHARED_LIBRARY) + +endif diff --git a/libnativehelper/include/nativehelper/JNIHelp.h b/libnativehelper/include/nativehelper/JNIHelp.h index eec7af8a9..3982797c8 100644 --- a/libnativehelper/include/nativehelper/JNIHelp.h +++ b/libnativehelper/include/nativehelper/JNIHelp.h @@ -42,6 +42,8 @@ int jniRegisterNativeMethods(C_JNIEnv* env, const char* className, /* * Throw an exception with the specified class and an optional message. + * The "className" argument will be passed directly to FindClass, which + * takes strings with slashes (e.g. "java/lang/Object"). * * Returns 0 on success, nonzero if something failed (e.g. the exception * class couldn't be found). |
