1 LOCAL_PATH := $(call my-dir)
3 ifeq ($(strip $(ANDROID_NDK)),)
4 $(error ANDROID_NDK is not set!)
7 $(warning "Current path" $(LOCAL_PATH))
8 $(info TC_PREFIX=$(TOOLCHAIN_PREFIX))
9 $(info CFLAGS=$(TARGET_CFLAGS))
10 $(info CXXFLAGS=$(TARGET_CXXFLAGS) $(TARGET_NO_EXECUTE_CFLAGS))
11 $(info CPPFLAGS=$(TARGET_CPPFLAGS))
12 $(info CPPPATH=$(TARGET_C_INCLUDES) $(__ndk_modules.$(APP_STL).EXPORT_C_INCLUDES))
13 $(info SYSROOT=$(SYSROOT_LINK))
14 $(info LDFLAGS=$(TARGET_LDFLAGS) $(TARGET_NO_EXECUTE_LDFLAGS) $(TARGET_NO_UNDEFINED_LDFLAGS) $(TARGET_RELRO_LDFLAGS))
15 $(info TC_VER=$(TOOLCHAIN_VERSION))
16 $(info PLATFORM=$(APP_PLATFORM))
19 OIC_LIB_PATH := ../../../../../../out/android/$(TARGET_ARCH_ABI)/debug
20 LOCAL_MODULE := android-octbstack
21 LOCAL_SRC_FILES := $(OIC_LIB_PATH)/liboctbstack.so
22 include $(PREBUILT_SHARED_LIBRARY)
25 OIC_LIB_PATH := ../../../../../../out/android/$(TARGET_ARCH_ABI)/debug
26 LOCAL_MODULE := android-connectivity_abstraction
27 LOCAL_SRC_FILES := $(OIC_LIB_PATH)/libconnectivity_abstraction.so
28 include $(PREBUILT_SHARED_LIBRARY)
31 OIC_LIB_PATH := ../../../../../../out/android/$(TARGET_ARCH_ABI)/debug
32 LOCAL_MODULE := android-easysetup
33 LOCAL_SRC_FILES := $(OIC_LIB_PATH)/libESSDK.a
34 include $(PREBUILT_STATIC_LIBRARY)
38 LOCAL_MODULE := easysetup-jni
40 #Add Pre processor definitions
41 DEFINE_FLAG = -DWITH_POSIX -D__ANDROID__
46 BUILD_FLAG = $(DEFINE_FLAG) $(DEBUG_FLAG)
48 LOCAL_CPPFLAGS = $(BUILD_FLAG)
49 LOCAL_CPPFLAGS += -std=c++0x -frtti -fexceptions
51 $(info CPPFLAGSUPDATED=$(LOCAL_CPPFLAGS))
53 NDK_ROOT := /home/madan/android-ndk-r10d
55 LOCAL_C_INCLUDES := $(LOCAL_PATH) \
56 $(LOCAL_PATH)/jniutil/inc \
57 $(LOCAL_PATH)/../../../../../../service/easy-setup/sdk/mediator/inc \
58 $(LOCAL_PATH)/../../../../../../service/easy-setup/sdk/common \
59 $(LOCAL_PATH)/../../../../../../resource/csdk/logger/include \
60 $(LOCAL_PATH)/../../../../../../resource/csdk/connectivity/common/inc \
61 $(LOCAL_PATH)/../../../../../../resource/include \
62 $(LOCAL_PATH)/../../../../../../resource/c_common \
63 $(LOCAL_PATH)/../../../../../../resource/oc_logger/include \
64 $(LOCAL_PATH)/../../../../../../resource/csdk/ocmalloc/include \
65 $(LOCAL_PATH)/../../../../../../resource/csdk/connectivity/api \
66 $(LOCAL_PATH)/../../../../../../resource/csdk/stack/include \
67 $(LOCAL_PATH)/../../../../../../resource/csdk/logger/include \
68 $(LOCAL_PATH)/../../../../../../resource/csdk/security/include \
69 $(LOCAL_PATH)/../../../../../../extlibs/cjson \
70 $(LOCAL_PATH)/../../../../../../extlibs/boost/boost_1_58_0 \
71 $(LOCAL_PATH)/../../../../../../extlibs/timer \
72 $(LOCAL_PATH)/../../../../../../android/android_api/base/jni \
73 $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(TOOLCHAIN_VERSION)/include \
74 $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(TOOLCHAIN_VERSION)/libs/$(TARGET_ARCH_ABI)/include \
76 LOCAL_SRC_FILES += $(patsubst $(LOCAL_PATH)/%, %, $(wildcard $(LOCAL_PATH)/jni_easy_setup.cpp))
77 LOCAL_SRC_FILES += $(patsubst $(LOCAL_PATH)/%, %, $(wildcard $(LOCAL_PATH)/jniutil/src/*.cpp))
80 LOCAL_LDLIBS += -L$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(TOOLCHAIN_VERSION)/libs/$(TARGET_ARCH_ABI)
81 LOCAL_SHARED_LIBRARIES := android-easysetup
82 LOCAL_SHARED_LIBRARIES += android-connectivity_abstraction
83 LOCAL_SHARED_LIBRARIES += android-octbstack
85 include $(BUILD_SHARED_LIBRARY)