Merge "Build libsimplejni using SDK" am: 86c0968a05
am: bebb47b683
Change-Id: Ib263bb9e4ecc987edc1de86c97ceff20f3119862
This commit is contained in:
@@ -31,18 +31,15 @@ LOCAL_SRC_FILES:= \
|
||||
native.cpp
|
||||
|
||||
# All of the shared libraries we link against.
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
liblog
|
||||
LOCAL_LDLIBS := -llog
|
||||
|
||||
# No static libraries.
|
||||
LOCAL_STATIC_LIBRARIES :=
|
||||
|
||||
# Also need the JNI headers.
|
||||
LOCAL_C_INCLUDES += \
|
||||
$(JNI_H_INCLUDE)
|
||||
|
||||
LOCAL_CFLAGS := -Wall -Werror
|
||||
|
||||
LOCAL_CXX_STL := none
|
||||
LOCAL_NDK_STL_VARIANT := none
|
||||
|
||||
LOCAL_SDK_VERSION := current
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -15,12 +15,18 @@
|
||||
*/
|
||||
|
||||
#define LOG_TAG "simplejni native.cpp"
|
||||
#include <utils/Log.h>
|
||||
#include <android/log.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "jni.h"
|
||||
|
||||
#define ALOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
|
||||
#define ALOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
|
||||
#define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
|
||||
#define ALOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__)
|
||||
#define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
|
||||
|
||||
static jint
|
||||
add(JNIEnv* /*env*/, jobject /*thiz*/, jint a, jint b) {
|
||||
int result = a + b;
|
||||
|
||||
Reference in New Issue
Block a user