hello.c
#include <android/log.h>
#define LOG_TAG "wms"
#define DEBUG 1
#if DEBUG
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
#else
#define LOGD(...)
#define LOGI(...)
#endif
int hello_world()
{
LOGI("========---------------==========>hello_world\n");
return 0;
}
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := HELLO
LOCAL_SRC_FILES := hello.c
LOCAL_LDLIBS :=-llog
include $(BUILD_SHARED_LIBRARY)