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/mediator/src \
59 $(LOCAL_PATH)/../../../../../../service/easy-setup/sdk/common \
60 $(LOCAL_PATH)/../../../../../../resource/csdk/logger/include \
61 $(LOCAL_PATH)/../../../../../../resource/csdk/connectivity/common/inc \
62 $(LOCAL_PATH)/../../../../../../resource/include \
63 $(LOCAL_PATH)/../../../../../../resource/c_common \
64 $(LOCAL_PATH)/../../../../../../resource/oc_logger/include \
65 $(LOCAL_PATH)/../../../../../../resource/csdk/ocmalloc/include \
66 $(LOCAL_PATH)/../../../../../../resource/csdk/connectivity/api \
67 $(LOCAL_PATH)/../../../../../../resource/csdk/stack/include \
68 $(LOCAL_PATH)/../../../../../../resource/csdk/logger/include \
69 $(LOCAL_PATH)/../../../../../../resource/csdk/security/include \
70 $(LOCAL_PATH)/../../../../../../extlibs/cjson \
71 $(LOCAL_PATH)/../../../../../../extlibs/boost/boost_1_58_0 \
72 $(LOCAL_PATH)/../../../../../../extlibs/timer \
73 $(LOCAL_PATH)/../../../../../../android/android_api/base/jni \
74 $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(TOOLCHAIN_VERSION)/include \
75 $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(TOOLCHAIN_VERSION)/libs/$(TARGET_ARCH_ABI)/include \
77 LOCAL_SRC_FILES += $(patsubst $(LOCAL_PATH)/%, %, $(wildcard $(LOCAL_PATH)/jni_easy_setup.cpp))
78 LOCAL_SRC_FILES += $(patsubst $(LOCAL_PATH)/%, %, $(wildcard $(LOCAL_PATH)/jniutil/src/*.cpp))
81 LOCAL_LDLIBS += -L$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(TOOLCHAIN_VERSION)/libs/$(TARGET_ARCH_ABI)
82 LOCAL_SHARED_LIBRARIES := android-easysetup
83 LOCAL_SHARED_LIBRARIES += android-connectivity_abstraction
84 LOCAL_SHARED_LIBRARIES += android-octbstack
86 include $(BUILD_SHARED_LIBRARY)