OSDN Git Service

Add scan result notification interfaces to wificond scanner am: 48fa2dc030 am: 3721ed...
[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 # TODO(b/33211652): Remove once ScannerImpl is fleshed out.
18 wificond_cpp_flags += -Wno-unused-private-field
19 wificond_parent_dir := $(LOCAL_PATH)/../
20 wificond_includes := \
21     $(wificond_parent_dir)
22
23
24 ###
25 ### wificond daemon.
26 ###
27 include $(CLEAR_VARS)
28 LOCAL_MODULE := wificond
29 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
30 LOCAL_INIT_RC := wificond.rc
31 LOCAL_C_INCLUDES := $(wificond_includes)
32 LOCAL_SRC_FILES := \
33     main.cpp
34 LOCAL_SHARED_LIBRARIES := \
35     libbinder \
36     libbase \
37     libcutils \
38     libminijail \
39     libutils \
40     libwifi-hal \
41     libwifi-system
42 LOCAL_STATIC_LIBRARIES := \
43     libwificond
44 include $(BUILD_EXECUTABLE)
45
46 ###
47 ### wificond static library
48 ###
49 include $(CLEAR_VARS)
50 LOCAL_MODULE := libwificond
51 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
52 LOCAL_C_INCLUDES := $(wificond_includes)
53 LOCAL_SRC_FILES := \
54     ap_interface_binder.cpp \
55     ap_interface_impl.cpp \
56     client_interface_binder.cpp \
57     client_interface_impl.cpp \
58     looper_backed_event_loop.cpp \
59     rtt/rtt_controller_binder.cpp \
60     rtt/rtt_controller_impl.cpp \
61     scanning/channel_settings.cpp \
62     scanning/hidden_network.cpp \
63     scanning/pno_network.cpp \
64     scanning/pno_settings.cpp \
65     scanning/scan_result.cpp \
66     scanning/single_scan_settings.cpp \
67     scanning/scan_utils.cpp \
68     scanning/scanner_impl.cpp \
69     server.cpp
70 LOCAL_SHARED_LIBRARIES := \
71     libbase \
72     libutils \
73     libwifi-hal \
74     libwifi-system
75 LOCAL_WHOLE_STATIC_LIBRARIES := \
76     libwificond_ipc \
77     libwificond_nl
78 include $(BUILD_STATIC_LIBRARY)
79
80 ###
81 ### wificond netlink library
82 ###
83 include $(CLEAR_VARS)
84 LOCAL_MODULE := libwificond_nl
85 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
86 LOCAL_C_INCLUDES := $(wificond_includes)
87 LOCAL_SRC_FILES := \
88     net/mlme_event.cpp \
89     net/netlink_manager.cpp \
90     net/netlink_utils.cpp \
91     net/nl80211_attribute.cpp \
92     net/nl80211_packet.cpp
93 LOCAL_SHARED_LIBRARIES := \
94     libbase
95 include $(BUILD_STATIC_LIBRARY)
96
97 ###
98 ### wificond IPC interface library
99 ###
100 include $(CLEAR_VARS)
101 LOCAL_MODULE := libwificond_ipc
102 LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/aidl
103 LOCAL_C_INCLUDES := $(wificond_includes)
104 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
105 LOCAL_SRC_FILES := \
106     ipc_constants.cpp \
107     aidl/android/net/wifi/IApInterface.aidl \
108     aidl/android/net/wifi/IANQPDoneCallback.aidl \
109     aidl/android/net/wifi/IClientInterface.aidl \
110     aidl/android/net/wifi/IInterfaceEventCallback.aidl \
111     aidl/android/net/wifi/IRttClient.aidl \
112     aidl/android/net/wifi/IRttController.aidl \
113     aidl/android/net/wifi/IScanEvent.aidl \
114     aidl/android/net/wifi/IWificond.aidl \
115     aidl/android/net/wifi/IWifiScannerImpl.aidl \
116     scanning/channel_settings.cpp \
117     scanning/hidden_network.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_CPPFLAGS := $(wificond_cpp_flags)
148 LOCAL_C_INCLUDES := $(wificond_includes)
149 LOCAL_SRC_FILES := \
150     tests/ap_interface_impl_unittest.cpp \
151     tests/client_interface_impl_unittest.cpp \
152     tests/looper_backed_event_loop_unittest.cpp \
153     tests/main.cpp \
154     tests/mock_netlink_manager.cpp \
155     tests/mock_netlink_utils.cpp \
156     tests/mock_scan_utils.cpp \
157     tests/netlink_manager_unittest.cpp \
158     tests/netlink_utils_unittest.cpp \
159     tests/nl80211_attribute_unittest.cpp \
160     tests/nl80211_packet_unittest.cpp \
161     tests/scan_result_unittest.cpp \
162     tests/scan_settings_unittest.cpp \
163     tests/scan_utils_unittest.cpp \
164     tests/server_unittest.cpp
165 LOCAL_STATIC_LIBRARIES := \
166     libgmock \
167     libgtest \
168     libwifi-hal-test \
169     libwifi-system-test \
170     libwificond \
171     libwificond_nl
172 LOCAL_SHARED_LIBRARIES := \
173     libbase \
174     libbinder \
175     liblog \
176     libutils \
177     libwifi-hal \
178     libwifi-system
179 include $(BUILD_NATIVE_TEST)
180
181 ###
182 ### wificond device integration tests.
183 ###
184 include $(CLEAR_VARS)
185 LOCAL_MODULE := wificond_integration_test
186 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
187 LOCAL_C_INCLUDES := $(wificond_includes)
188 LOCAL_SRC_FILES := \
189     tests/integration/ap_interface_test.cpp \
190     tests/integration/client_interface_test.cpp \
191     tests/integration/life_cycle_test.cpp \
192     tests/integration/scanner_test.cpp \
193     tests/integration/service_test.cpp \
194     tests/main.cpp \
195     tests/shell_unittest.cpp
196 LOCAL_SHARED_LIBRARIES := \
197     libbase \
198     libbinder \
199     libcutils \
200     libutils \
201     libwifi-system
202 LOCAL_STATIC_LIBRARIES := \
203     libgmock \
204     libwificond_ipc \
205     libwificond_test_utils
206 include $(BUILD_NATIVE_TEST)
207
208 ###
209 ### wpa_supplicant binder integration tests.
210 ### (Compiled only when wpa_supplicant's binder interface is enabled)
211 ###
212 ifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
213 include $(CLEAR_VARS)
214 LOCAL_MODULE := wpa_supplicant_binder_test
215 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
216 LOCAL_SRC_FILES := \
217     tests/integration/wpa_supplicant_binder/connect_tests.cpp \
218     tests/integration/wpa_supplicant_binder/main.cpp \
219     tests/integration/wpa_supplicant_binder/network_params.cpp \
220     tests/integration/wpa_supplicant_binder/test_base.cpp \
221     tests/integration/wpa_supplicant_binder/tests.cpp
222 LOCAL_SHARED_LIBRARIES := \
223     libbase \
224     libbinder \
225     libcutils \
226     libutils \
227     libwifi-hal \
228     libwifi-system
229 LOCAL_STATIC_LIBRARIES := \
230     libgmock \
231     libjsoncpp \
232     libwificond_test_utils \
233     libwpa_binder_interface
234 include $(BUILD_NATIVE_TEST)
235 endif # WPA_SUPPLICANT_USE_BINDER == y