Please follow the below guidelines:
Sample Android.mk File
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libvncclient
LOCAL_SRC_FILES := <source file names, current directory will be jni>
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/
LOCAL_CFLAGS := <MACRO DEFINITIONS>
LOCAL_LDLIBS :=
LOCAL_SHARED_LIBRARIES :=
include $(BUILD_SHARED_LIBRARY)
- Consider the $PROJECT as the Project Directory, say SampleApplication as my Project.
- Create two Directories inside the Project Directory, namely
- jni\
- code\
- Place the Android.mk inside the jni\ directory.
- Place the entire code inside the code\ directory.
- Open command prompt and go to the $Project directory, then run %NDK_BUILD%, provided you are in windows and you have created an Environment Variable named NDK_BUILD which will be as follows: eg: D:\Backups\Android-NDK\ndk-build.
- Build the code in windows by giving %NDK_BUILD%.
Sample Android.mk File
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libvncclient
LOCAL_SRC_FILES := <source file names, current directory will be jni>
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/
LOCAL_CFLAGS := <MACRO DEFINITIONS>
LOCAL_LDLIBS :=
LOCAL_SHARED_LIBRARIES :=
include $(BUILD_SHARED_LIBRARY)
TADA.......................
No comments:
Post a Comment