OSDN Git Service

Add test config to wificond_unit_test
[android-x86/system-connectivity-wificond.git] / Android.mk
1 # Copyright (C) 2016 The Android Open Source Project
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 LOCAL_PATH := $(call my-dir)
16 wificond_cpp_flags := -Wall -Werror -Wno-unused-parameter
17 wificond_parent_dir := $(LOCAL_PATH)/../
18 wificond_includes := \
19     $(wificond_parent_dir)
20
21
22 ###
23 ### wificond daemon.
24 ###
25 include $(CLEAR_VARS)
26 LOCAL_MODULE := wificond
27 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
28 LOCAL_INIT_RC := wificond.rc
29 LOCAL_C_INCLUDES := $(wificond_includes)
30 LOCAL_SRC_FILES := \
31     main.cpp
32 LOCAL_SHARED_LIBRARIES := \
33     libbinder \
34     libbase \
35     libcutils \
36     libminijail \
37     libutils \
38     libwifi-system
39 LOCAL_STATIC_LIBRARIES := \
40     libwificond
41 include $(BUILD_EXECUTABLE)
42
43 ###
44 ### wificond static library
45 ###
46 include $(CLEAR_VARS)
47 LOCAL_MODULE := libwificond
48 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
49 LOCAL_C_INCLUDES := $(wificond_includes)
50 LOCAL_SRC_FILES := \
51     ap_interface_binder.cpp \
52     ap_interface_impl.cpp \
53     client_interface_binder.cpp \
54     client_interface_impl.cpp \
55     logging_utils.cpp \
56     looper_backed_event_loop.cpp \
57     rtt/rtt_controller_binder.cpp \
58     rtt/rtt_controller_impl.cpp \
59     scanning/channel_settings.cpp \
60     scanning/hidden_network.cpp \
61     scanning/pno_network.cpp \
62     scanning/pno_settings.cpp \
63     scanning/scan_result.cpp \
64     scanning/single_scan_settings.cpp \
65     scanning/scan_utils.cpp \
66     scanning/scanner_impl.cpp \
67     server.cpp
68 LOCAL_SHARED_LIBRARIES := \
69     libbase \
70     libutils \
71     libwifi-system
72 LOCAL_WHOLE_STATIC_LIBRARIES := \
73     libwificond_ipc \
74     libwificond_nl
75 include $(BUILD_STATIC_LIBRARY)
76
77 ###
78 ### wificond netlink library
79 ###
80 include $(CLEAR_VARS)
81 LOCAL_MODULE := libwificond_nl
82 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
83 LOCAL_C_INCLUDES := $(wificond_includes)
84 LOCAL_SRC_FILES := \
85     net/mlme_event.cpp \
86     net/netlink_manager.cpp \
87     net/netlink_utils.cpp \
88     net/nl80211_attribute.cpp \
89     net/nl80211_packet.cpp
90 LOCAL_SHARED_LIBRARIES := \
91     libbase
92 include $(BUILD_STATIC_LIBRARY)
93
94 ###
95 ### wificond IPC interface library
96 ###
97 include $(CLEAR_VARS)
98 LOCAL_MODULE := libwificond_ipc
99 LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/aidl
100 LOCAL_C_INCLUDES := $(wificond_includes)
101 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
102 LOCAL_SRC_FILES := \
103     ipc_constants.cpp \
104     aidl/android/net/wifi/IApInterface.aidl \
105     aidl/android/net/wifi/IANQPDoneCallback.aidl \
106     aidl/android/net/wifi/IClientInterface.aidl \
107     aidl/android/net/wifi/IInterfaceEventCallback.aidl \
108     aidl/android/net/wifi/IPnoScanEvent.aidl \
109     aidl/android/net/wifi/IRttClient.aidl \
110     aidl/android/net/wifi/IRttController.aidl \
111     aidl/android/net/wifi/IScanEvent.aidl \
112     aidl/android/net/wifi/IWificond.aidl \
113     aidl/android/net/wifi/IWifiScannerImpl.aidl \
114     scanning/channel_settings.cpp \
115     scanning/hidden_network.cpp \
116     scanning/pno_network.cpp \
117     scanning/pno_settings.cpp \
118     scanning/scan_result.cpp \
119     scanning/single_scan_settings.cpp
120 LOCAL_SHARED_LIBRARIES := \
121     libbinder
122 include $(BUILD_STATIC_LIBRARY)
123
124 ###
125 ### test util library
126 ###
127 include $(CLEAR_VARS)
128 LOCAL_MODULE := libwificond_test_utils
129 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
130 LOCAL_C_INCLUDES := $(wificond_includes)
131 LOCAL_SRC_FILES := \
132     looper_backed_event_loop.cpp \
133     tests/integration/binder_dispatcher.cpp \
134     tests/integration/process_utils.cpp \
135     tests/shell_utils.cpp
136 LOCAL_SHARED_LIBRARIES := \
137     libbase
138 LOCAL_WHOLE_STATIC_LIBRARIES := \
139     libwificond_ipc
140 include $(BUILD_STATIC_LIBRARY)
141
142 ###
143 ### wificond unit tests.
144 ###
145 include $(CLEAR_VARS)
146 LOCAL_MODULE := wificond_unit_test
147 LOCAL_COMPATIBILITY_SUITE := device-tests
148 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
149 LOCAL_C_INCLUDES := $(wificond_includes)
150 LOCAL_SRC_FILES := \
151     tests/ap_interface_impl_unittest.cpp \
152     tests/client_interface_impl_unittest.cpp \
153     tests/looper_backed_event_loop_unittest.cpp \
154     tests/main.cpp \
155     tests/mock_netlink_manager.cpp \
156     tests/mock_netlink_utils.cpp \
157     tests/mock_scan_utils.cpp \
158     tests/netlink_manager_unittest.cpp \
159     tests/netlink_utils_unittest.cpp \
160     tests/nl80211_attribute_unittest.cpp \
161     tests/nl80211_packet_unittest.cpp \
162     tests/scan_result_unittest.cpp \
163     tests/scan_settings_unittest.cpp \
164     tests/scan_utils_unittest.cpp \
165     tests/server_unittest.cpp
166 LOCAL_STATIC_LIBRARIES := \
167     libgmock \
168     libgtest \
169     libwifi-system-test \
170     libwificond \
171     libwificond_nl
172 LOCAL_SHARED_LIBRARIES := \
173     libbase \
174     libbinder \
175     liblog \
176     libutils \
177     libwifi-system
178 include $(BUILD_NATIVE_TEST)
179
180 ###
181 ### wificond device integration tests.
182 ###
183 include $(CLEAR_VARS)
184 LOCAL_MODULE := wificond_integration_test
185 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
186 LOCAL_C_INCLUDES := $(wificond_includes)
187 LOCAL_SRC_FILES := \
188     tests/integration/ap_interface_test.cpp \
189     tests/integration/client_interface_test.cpp \
190     tests/integration/life_cycle_test.cpp \
191     tests/integration/scanner_test.cpp \
192     tests/integration/service_test.cpp \
193     tests/main.cpp \
194     tests/shell_unittest.cpp
195 LOCAL_SHARED_LIBRARIES := \
196     libbase \
197     libbinder \
198     libcutils \
199     libutils \
200     libwifi-system
201 LOCAL_STATIC_LIBRARIES := \
202     libgmock \
203     libwificond_ipc \
204     libwificond_test_utils
205 include $(BUILD_NATIVE_TEST)