1 $(info TC_PREFIX=$(TOOLCHAIN_PREFIX))
2 $(info CFLAGS=$(TARGET_CFLAGS))
3 $(info CXXFLAGS=$(TARGET_CXXFLAGS) $(TARGET_NO_EXECUTE_CFLAGS))
4 $(info CPPPATH=$(TARGET_C_INCLUDES) $(__ndk_modules.$(APP_STL).EXPORT_C_INCLUDES))
5 $(info SYSROOT=$(SYSROOT_LINK))
6 $(info LDFLAGS=$(TARGET_LDFLAGS) $(TARGET_NO_EXECUTE_LDFLAGS) $(TARGET_NO_UNDEFINED_LDFLAGS) $(TARGET_RELRO_LDFLAGS))
7 $(info TC_VER=$(TOOLCHAIN_VERSION))
8 $(info PLATFORM=$(APP_PLATFORM))
11 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15 PROJECT_ROOT_PATH ?= ../..
16 ROOT_DIR_PATH = ../../../../../..
17 EXT_LIB_PATH = $(ROOT_DIR_PATH)/extlibs
18 PROJECT_API_PATH = $(PROJECT_ROOT_PATH)/api
19 PROJECT_INC_PATH = $(PROJECT_ROOT_PATH)/inc
20 PROJECT_SRC_PATH = $(PROJECT_ROOT_PATH)/src
21 PROJECT_COMMON_PATH = $(PROJECT_ROOT_PATH)/common
22 PROJECT_COMMON_INC_PATH = $(PROJECT_COMMON_PATH)/inc
23 PROJECT_COMMON_SRC_PATH = $(PROJECT_COMMON_PATH)/src
24 PROJECT_LIB_PATH = $(PROJECT_ROOT_PATH)/lib
25 PROJECT_EXTERNAL_PATH = $(PROJECT_ROOT_PATH)/external/inc
26 DTLS_LIB = $(EXT_LIB_PATH)/tinydtls
27 OIC_C_COMMON_PATH = $(ROOT_DIR_PATH)/resource/c_common
28 #GLIB_PATH = ../../../../../../extlibs/glib/glib-2.40.2
30 #Modify below values to enable/disable the Adapter
31 #Suffix "NO_" to disable given adapter
36 #Add Pre processor definitions
37 DEFINE_FLAG = -DWITH_POSIX -D__ANDROID__
38 DEFINE_FLAG = -D__WITH_DTLS__
39 DEFINE_FLAG += -D$(EDR) -D$(LE) -D$(IP)
44 BUILD_FLAG.debug = $(DEFINE_FLAG) $(DEBUG_FLAG)
45 BUILD_FLAG.release = $(DEFINE_FLAG)
46 BUILD_FLAG = $(BUILD_FLAG.$(BUILD))
48 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
51 #include $(CLEAR_VARS)
52 #LOCAL_PATH = $(PROJECT_LIB_PATH)/android
54 #LOCAL_SRC_FILES := libglib-2.40.2.so
55 #LOCAL_EXPORT_C_INCLUDES = $(GLIB_PATH) \
58 #include $(PREBUILT_SHARED_LIBRARY)
60 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
63 #include $(CLEAR_VARS)
64 #LOCAL_PATH = $(PROJECT_LIB_PATH)/android
65 #LOCAL_MODULE = GLibThread
66 #LOCAL_SRC_FILES := libgthread-2.40.2.so
67 #LOCAL_EXPORT_C_INCLUDES = $(GLIB_PATH) \
70 #include $(PREBUILT_SHARED_LIBRARY)
72 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
76 include $(DTLS_LIB)/Android.mk
78 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
79 #Build OIC C Common libraries required for CA
82 LOCAL_MODULE = OICCommon
84 #Build Common Libraries
85 LOCAL_PATH = $(OIC_C_COMMON_PATH)
86 LOCAL_CFLAGS = -D__ANDROID__ $(DEBUG_FLAG)
87 LOCAL_CFLAGS += -std=c99
89 LOCAL_C_INCLUDES = $(OIC_C_COMMON_PATH)/oic_malloc/include \
90 $(OIC_C_COMMON_PATH)/oic_string/include
91 LOCAL_SRC_FILES = oic_malloc/src/oic_malloc.c \
92 oic_string/src/oic_string.c
94 include $(BUILD_STATIC_LIBRARY)
96 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
101 #Build Common Libraries
102 LOCAL_PATH = $(PROJECT_COMMON_SRC_PATH)
103 LOCAL_MODULE = CACommon
104 LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog
105 #LOCAL_SHARED_LIBRARIES = Glib GLibThread
106 LOCAL_STATIC_LIBRARIES = rt pthread
107 LOCAL_STATIC_LIBRARIES += OICCommon
109 LOCAL_CFLAGS = -D__ANDROID__ $(DEBUG_FLAG)
110 LOCAL_CFLAGS += -std=c99
112 LOCAL_C_INCLUDES = $(PROJECT_COMMON_INC_PATH)
113 LOCAL_C_INCLUDES += $(PROJECT_API_PATH)
114 LOCAL_C_INCLUDES += $(OIC_C_COMMON_PATH)/oic_malloc/include
115 LOCAL_C_INCLUDES += $(OIC_C_COMMON_PATH)/oic_string/include
117 LOCAL_SRC_FILES = oic_logger.c oic_console_logger.c logger.c \
118 uarraylist.c uqueue.c \
119 cathreadpool_pthreads.c camutex_pthreads.c
121 include $(BUILD_STATIC_LIBRARY)
123 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
126 include $(CLEAR_VARS)
128 LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog
129 LOCAL_PATH = $(PROJECT_LIB_PATH)/libcoap-4.1.1
130 LOCAL_MODULE = CACoap
131 LOCAL_EXPORT_C_INCLUDES = $(PROJECT_LIB_PATH)/libcoap-4.1.1
132 LOCAL_CFLAGS = -DWITH_POSIX
133 LOCAL_SRC_FILES = pdu.c net.c debug.c encode.c uri.c coap_list.c resource.c hashkey.c \
134 str.c option.c async.c subscribe.c block.c
136 include $(BUILD_STATIC_LIBRARY)
138 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
141 #Relative path to LOCAL_PATH (PROJECT_SRC_PATH)
142 LOCAL_PLATFORM = android
144 ENET_ADAPTER_PATH = ethernet_adapter/$(LOCAL_PLATFORM)
145 EDR_ADAPTER_PATH = bt_edr_adapter/$(LOCAL_PLATFORM)
146 LE_ADAPTER_PATH = bt_le_adapter/$(LOCAL_PLATFORM)
147 IP_ADAPTER_PATH = ip_adapter
148 ADAPTER_UTILS = adapter_util
150 include $(CLEAR_VARS)
152 LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog
153 LOCAL_PATH = $(PROJECT_SRC_PATH)
156 LOCAL_STATIC_LIBRARIES = CACommon CACoap TinyDtls
158 LOCAL_C_INCLUDES = $(PROJECT_API_PATH)
159 LOCAL_C_INCLUDES += $(PROJECT_COMMON_INC_PATH)
160 LOCAL_C_INCLUDES += $(PROJECT_INC_PATH)
161 LOCAL_C_INCLUDES += $(PROJECT_LIB_PATH)/libcoap-4.1.1
162 LOCAL_C_INCLUDES += $(PROJECT_EXTERNAL_PATH)
163 LOCAL_C_INCLUDES += $(OIC_C_COMMON_PATH)/oic_malloc/include
164 LOCAL_C_INCLUDES += $(OIC_C_COMMON_PATH)/oic_string/include
166 LOCAL_C_INCLUDES += $(DTLS_LIB)
168 LOCAL_CFLAGS += $(BUILD_FLAG)
169 LOCAL_CFLAGS += -std=c99 -DWITH_POSIX
172 caconnectivitymanager.c caremotehandler.c cainterfacecontroller.c \
173 camessagehandler.c canetworkconfigurator.c caprotocolmessage.c \
174 caretransmission.c caqueueingthread.c \
175 $(ADAPTER_UTILS)/caadapternetdtls.c $(ADAPTER_UTILS)/caadapterutils.c \
176 $(ADAPTER_UTILS)/camsgparser.c \
177 bt_le_adapter/caleadapter.c $(LE_ADAPTER_PATH)/caleclient.c \
178 $(LE_ADAPTER_PATH)/caleserver.c $(LE_ADAPTER_PATH)/caleutils.c \
179 $(LE_ADAPTER_PATH)/calenwmonitor.c \
180 bt_edr_adapter/caedradapter.c $(EDR_ADAPTER_PATH)/caedrutils.c \
181 $(EDR_ADAPTER_PATH)/caedrclient.c $(EDR_ADAPTER_PATH)/caedrserver.c \
182 $(EDR_ADAPTER_PATH)/caedrnwmonitor.c \
183 $(IP_ADAPTER_PATH)/caipadapter.c $(IP_ADAPTER_PATH)/caipserver.c \
184 $(IP_ADAPTER_PATH)/caipclient.c $(IP_ADAPTER_PATH)/android/caipnwmonitor.c \
186 include $(BUILD_STATIC_LIBRARY)