4 PROJECT_ROOT_PATH ?= ../..
5 PROJECT_API_PATH = $(PROJECT_ROOT_PATH)/api
6 PROJECT_INC_PATH = $(PROJECT_ROOT_PATH)/inc
7 PROJECT_SRC_PATH = $(PROJECT_ROOT_PATH)/src
8 PROJECT_COMMON_PATH = $(PROJECT_ROOT_PATH)/common
9 PROJECT_COMMON_INC_PATH = $(PROJECT_COMMON_PATH)/inc
10 PROJECT_COMMON_SRC_PATH = $(PROJECT_COMMON_PATH)/src
11 PROJECT_LIB_PATH = $(PROJECT_ROOT_PATH)/lib
13 #Modify below values to enable/disable the Adapter
14 #Suffix "NO_" to disable given adapter
18 ETHERNET = NO_ETHERNET_ADAPTER
20 #Add Pre processor definitions
21 DEFINE_FLAG = -DWITH_POSIX -D__ANDROID__
22 DEFINE_FLAG += -D$(EDR) -D$(LE) -D$(WIFI) -D$(ETHERNET)
26 #DEBUG_FLAG += -DADB_SHELL
28 BUILD_FLAG.debug = $(DEFINE_FLAG) $(DEBUG_FLAG)
29 BUILD_FLAG.release = $(DEFINE_FLAG)
30 BUILD_FLAG = $(BUILD_FLAG.$(BUILD))
32 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
36 include $(PROJECT_LIB_PATH)/android/glib-master/Android.mk
37 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
42 #Build Common Libraries
43 LOCAL_PATH = $(PROJECT_COMMON_SRC_PATH)
44 LOCAL_MODULE = CACommon
45 LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog
47 LOCAL_SHARED_LIBRARIES = glib-2.0 gthread-2.0
49 LOCAL_CFLAGS = -D__ANDROID__ $(DEBUG_FLAG)
51 LOCAL_C_INCLUDES = $(PROJECT_COMMON_INC_PATH)
52 LOCAL_C_INCLUDES += $(PROJECT_API_PATH)
53 LOCAL_C_INCLUDES += $(PROJECT_LIB_PATH)/android/glib-master \
54 $(PROJECT_LIB_PATH)/android/glib-master/android
56 LOCAL_SRC_FILES = oic_logger.c \
57 oic_console_logger.c logger.c oic_malloc.c \
58 uarraylist.c uqueue.c oic_string.c \
59 uthreadpool.c umutex.c
61 include $(BUILD_STATIC_LIBRARY)
63 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
68 LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog
69 LOCAL_PATH = $(PROJECT_LIB_PATH)/libcoap-4.1.1
71 LOCAL_EXPORT_C_INCLUDES = $(PROJECT_LIB_PATH)/libcoap-4.1.1
72 LOCAL_CFLAGS = -DWITH_POSIX
73 LOCAL_SRC_FILES = pdu.c net.c debug.c encode.c uri.c coap_list.c resource.c hashkey.c \
74 str.c option.c async.c subscribe.c block.c
76 include $(BUILD_STATIC_LIBRARY)
78 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
81 #Relative path to LOCAL_PATH (PROJECT_SRC_PATH)
82 LOCAL_PLATFORM = android
84 ENET_ADAPTER_PATH = ethernet_adapter/$(LOCAL_PLATFORM)
85 EDR_ADAPTER_PATH = bt_edr_adapter/$(LOCAL_PLATFORM)
86 LE_ADAPTER_PATH = bt_le_adapter/$(LOCAL_PLATFORM)
87 WIFI_ADAPTER_PATH = wifi_adapter/$(LOCAL_PLATFORM)
88 ADAPTER_UTILS = adapter_util
92 LOCAL_LDLIBS += -L$(SYSROOT)/usr/lib -llog
93 LOCAL_PATH = $(PROJECT_SRC_PATH)
96 LOCAL_STATIC_LIBRARIES = CACommon CACoap
98 LOCAL_C_INCLUDES = $(PROJECT_API_PATH)
99 LOCAL_C_INCLUDES += $(PROJECT_COMMON_INC_PATH)
100 LOCAL_C_INCLUDES += $(PROJECT_INC_PATH)
101 LOCAL_C_INCLUDES += $(PROJECT_LIB_PATH)/libcoap-4.1.1
103 LOCAL_C_INCLUDES += $(PROJECT_LIB_PATH)/android/glib-master \
104 $(PROJECT_LIB_PATH)/android/glib-master/android
106 LOCAL_CFLAGS += $(BUILD_FLAG)
109 caconnectivitymanager.c caremotehandler.c cainterfacecontroller.c camessagehandler.c \
110 canetworkconfigurator.c caprotocolmessage.c \
112 $(ADAPTER_UTILS)/caadapterutils.c $(ADAPTER_UTILS)/camessagequeue.c \
113 $(ADAPTER_UTILS)/camsgparser.c \
114 $(EDR_ADAPTER_PATH)/caedradapter.c \
115 $(LE_ADAPTER_PATH)/caleadapter.c $(LE_ADAPTER_PATH)/caleclient.c $(LE_ADAPTER_PATH)/caleserver.c \
116 wifi_adapter/cawifiadapter.c $(WIFI_ADAPTER_PATH)/cawifiserver.c \
117 $(WIFI_ADAPTER_PATH)/cawificlient.c $(WIFI_ADAPTER_PATH)/cawifinwmonitor.c
119 include $(BUILD_STATIC_LIBRARY)