Merge test folder of test branch
[iotivity.git] / test / build / android / ca / gtest / jni / Android.mk
1 APP_PATH := $(call my-dir)
2 PROJECT_ROOT_PATH = $(IOTIVITY_ROOT)/resource/csdk/connectivity
3 SIMULATOR_INCLUDE_PATH = $(IOTIVITY_TEST_ROOT)/src/testapp/ca/c_cpp/include
4 SIMULATOR_SRC_PATH = $(IOTIVITY_TEST_ROOT)/src/testapp/ca/c_cpp/src
5 ITC_PATH = $(IOTIVITY_TEST_ROOT)/src/tc/ca/gtest/src/stc
6 UTC_PATH = $(IOTIVITY_TEST_ROOT)/src/tc/ca/gtest/src/btc
7 HELPER_SRC_PATH = $(IOTIVITY_TEST_ROOT)/src/tc/ca/gtest/src/helper
8 HELPER_HEADER_PATH = $(IOTIVITY_TEST_ROOT)/src/tc/ca/gtest/include
9 COMMON_UTIL_SRC_PATH = $(IOTIVITY_TEST_ROOT)/src/common/commonutil/c_cpp
10 COMMON_UTIL_HEADER_PATH = $(IOTIVITY_TEST_ROOT)/include
11 CURRENT_PATH = $(IOTIVITY_TEST_ROOT)/build/android/ca/gtest/jni
12 EXTERNAL_PATH = $(CURRENT_PATH)/external
13 GTEST_PATH = $(IOTIVITY_TEST_ROOT)/extlibs/gtest-1.7.0
14 BOOST_PATH = $(IOTIVITY_ROOT)/extlibs/boost/boost_1_58_0
15
16 include $(CLEAR_VARS)
17 LOCAL_MODULE := libgtest
18 LOCAL_CPP_EXTENSION := .cc
19 LOCAL_C_INCLUDES := $(GTEST_PATH)/include $(GTEST_PATH)
20 LOCAL_SRC_FILES := $(GTEST_PATH)/src/gtest-all.cc
21 include $(BUILD_STATIC_LIBRARY)
22
23 include $(CLEAR_VARS)
24 LOCAL_MODULE := boostsystemModule
25 LOCAL_C_INCLUDES := $(BOOST_PATH)
26 LOCAL_SRC_FILES := $(BOOST_PATH)/libs/system/src/error_code.cpp
27 include $(BUILD_STATIC_LIBRARY)
28
29 include $(CLEAR_VARS)
30 LOCAL_MODULE := boostfilesystemModule
31 LOCAL_C_INCLUDES := $(BOOST_PATH)
32 LOCAL_SRC_FILES := $(BOOST_PATH)/libs/filesystem/src/codecvt_error_category.cpp \
33                 $(BOOST_PATH)/libs/filesystem/src/operations.cpp \
34                 $(BOOST_PATH)/libs/filesystem/src/path.cpp \
35                 $(BOOST_PATH)/libs/filesystem/src/path_traits.cpp \
36                 $(BOOST_PATH)/libs/filesystem/src/portability.cpp \
37                 $(BOOST_PATH)/libs/filesystem/src/unique_path.cpp \
38                 $(BOOST_PATH)/libs/filesystem/src/utf8_codecvt_facet.cpp \
39                 $(BOOST_PATH)/libs/filesystem/src/windows_file_codecvt.cpp \
40                 $(BOOST_PATH)/libs/filesystem/src/windows_file_codecvt.hpp
41 include $(BUILD_STATIC_LIBRARY)
42
43 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
44
45 IOTIVITY_INCLUDE := $(IOTIVITY_ROOT)/resource/csdk/connectivity/api
46 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/connectivity/inc
47 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/connectivity/external/inc
48 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/c_common
49 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/stack/include
50 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/include
51 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)resource/csdk/logger/include
52 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/c_common/ocrandom/include
53 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/logger/include/experimental
54 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/logger/include
55 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/c_common/oic_malloc/include
56 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/c_common/oic_string/include
57 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/connectivity/lib/libcoap-4.1.1/include
58 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/connectivity/common/inc
59 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/extlibs/mbedtls/mbedtls/include/mbedtls
60 IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/out/android/$(IOTIVITY_TARGET_ARCH)/${RELEASE_DIR}/resource/c_common
61
62 COMMON_TC_INCLUDE := $(BOOST_PATH) $(GTEST_PATH) $(GTEST_PATH)/include
63 COMMON_TC_INCLUDE += $(IOTIVITY_INCLUDE)
64 COMMON_TC_INCLUDE += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
65
66 LOCAL_PATH := $(call my-dir)
67 include $(CLEAR_VARS)
68 LOCAL_MODULE := connectivity_abstraction
69 LOCAL_SRC_FILES := $(IOTIVITY_ROOT)/out/android/$(IOTIVITY_TARGET_ARCH)/${RELEASE_DIR}/libconnectivity_abstraction.so
70 include $(PREBUILT_SHARED_LIBRARY)
71
72 include $(CLEAR_VARS)
73 LOCAL_PATH := $(APP_PATH)
74 LOCAL_MODULE := helper_interface
75 LOCAL_STATIC_LIBRARIES := libgtest boostsystemModule boostfilesystemModule
76 LOCAL_SHARED_LIBRARIES := connectivity_abstraction
77 LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
78 LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAHelper.cpp $(COMMON_UTIL_SRC_PATH)/CommonUtil.cpp $(COMMON_UTIL_SRC_PATH)/CommonTestUtil.cpp
79 LOCAL_LDLIBS := -llog
80 LOCAL_CFLAGS := -std=gnu++11 -fpermissive -D__CA__ -D__WITH_DTLS__ -DTCP_ADAPTER -D__ANDROID_NATIVE__
81 LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
82 include $(BUILD_STATIC_LIBRARY)
83
84 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
85
86 include $(CLEAR_VARS)
87 LOCAL_PATH := $(APP_PATH)
88 LOCAL_MODULE := tcp_helper_interface
89 LOCAL_STATIC_LIBRARIES := libgtest boostsystemModule boostfilesystemModule
90 LOCAL_SHARED_LIBRARIES := connectivity_abstraction
91 LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
92 LOCAL_C_INCLUDES += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
93 LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAHelper.cpp $(COMMON_UTIL_SRC_PATH)/CommonUtil.cpp
94 LOCAL_LDLIBS := -llog
95 LOCAL_CFLAGS := -std=gnu++11 -fpermissive -D__CA__ -DTCP_ADAPTER -D__ANDROID_NATIVE__ -D__WITH_DTLS__
96 LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
97 include $(BUILD_STATIC_LIBRARY)
98
99 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
100
101 include $(CLEAR_VARS)
102 LOCAL_MODULE := iotivity_ca_test
103 LOCAL_STATIC_LIBRARIES := helper_interface
104 LOCAL_SHARED_LIBRARIES := connectivity_abstraction
105 LOCAL_CFLAGS := -std=gnu++11 -fPIE -fpermissive -D__CA__ -D__ANDROID__ -D__ANDROID_NATIVE__ -D__ALL_TRANSPORT__ -D__WITH_DTLS__
106 LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
107 LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
108 LOCAL_C_INCLUDES += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
109 LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAAndroidGtestRunner.cpp \
110                      $(ITC_PATH)/CACommonTest.cpp \
111                      $(UTC_PATH)/CATest.cpp
112 LOCAL_LDFLAGS := -fPIE -pie
113 include $(BUILD_EXECUTABLE)
114
115 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
116 include $(CLEAR_VARS)
117 LOCAL_MODULE := iotivity_ca_ip_test
118 LOCAL_STATIC_LIBRARIES := helper_interface
119 LOCAL_SHARED_LIBRARIES := connectivity_abstraction
120 LOCAL_CFLAGS := -std=gnu++11 -fPIE -fpermissive -D__CA__ -D__ANDROID__ -D__ANDROID_NATIVE__ -D__ALL_TRANSPORT__ -D__IP__ -D__WITH_DTLS__
121 LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
122 LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
123 LOCAL_C_INCLUDES += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
124 LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAAndroidGtestRunner.cpp \
125                      $(ITC_PATH)/CANetworkCommonTest.cpp  \
126                      $(ITC_PATH)/CAClientTest.cpp \
127                      $(ITC_PATH)/CAMulticastTest.cpp \
128                      $(UTC_PATH)/CANetworkTest.cpp
129 LOCAL_LDFLAGS := -fPIE -pie
130 include $(BUILD_EXECUTABLE)
131
132 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
133 include $(CLEAR_VARS)
134 LOCAL_MODULE := iotivity_ca_tcp_test
135 LOCAL_STATIC_LIBRARIES := helper_interface
136 LOCAL_SHARED_LIBRARIES := connectivity_abstraction
137 LOCAL_CFLAGS := -std=gnu++11 -fPIE -fpermissive -D__CA__ -DTCP_ADAPTER -D__ANDROID__ -D__ANDROID_NATIVE__ -D__ALL_TRANSPORT__ -D__TCP__ -D__WITH_DTLS__
138 LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
139 LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
140 LOCAL_C_INCLUDES += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
141 LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAAndroidGtestRunner.cpp \
142                      $(ITC_PATH)/CANetworkCommonTest.cpp  \
143                      $(ITC_PATH)/CAClientTest.cpp \
144                      $(UTC_PATH)/CANetworkTest.cpp
145
146 LOCAL_LDFLAGS := -fPIE -pie
147 include $(BUILD_EXECUTABLE)
148
149 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
150 include $(CLEAR_VARS)
151 LOCAL_MODULE := iotivity_ca_simulator
152 LOCAL_SHARED_LIBRARIES := connectivity_abstraction
153 #LOCAL_STATIC_LIBRARIES := CA
154 LOCAL_CFLAGS := -std=gnu++11 -fPIE -fpermissive -D__CA__ -D__WITH_DTLS__ -D__ANDROID_NATIVE__ -DTCP_ADAPTER
155 LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
156 LOCAL_C_INCLUDES = $(IOTIVITY_INCLUDE)
157 LOCAL_C_INCLUDES += $(SIMULATOR_INCLUDE_PATH)
158 LOCAL_SRC_FILES := $(SIMULATOR_SRC_PATH)/ca_simulator.c
159 LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
160 LOCAL_LDFLAGS := -fPIE -pie
161 include $(BUILD_EXECUTABLE)
162 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++