OSDN Git Service

Add interfaces for getting available channels to WifiScannerImpl am: 87a24f50bf am...
[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 := -std=c++11 -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/IWificond.aidl \
114     aidl/android/net/wifi/IWifiScannerImpl.aidl \
115     scanning/channel_settings.cpp \
116     scanning/hidden_network.cpp \
117     scanning/scan_result.cpp \
118     scanning/single_scan_settings.cpp
119 LOCAL_SHARED_LIBRARIES := \
120     libbinder
121 include $(BUILD_STATIC_LIBRARY)
122
123 ###
124 ### test util library
125 ###
126 include $(CLEAR_VARS)
127 LOCAL_MODULE := libwificond_test_utils
128 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
129 LOCAL_C_INCLUDES := $(wificond_includes)
130 LOCAL_SRC_FILES := \
131     looper_backed_event_loop.cpp \
132     tests/integration/binder_dispatcher.cpp \
133     tests/integration/process_utils.cpp \
134     tests/shell_utils.cpp
135 LOCAL_SHARED_LIBRARIES := \
136     libbase
137 LOCAL_WHOLE_STATIC_LIBRARIES := \
138     libwificond_ipc
139 include $(BUILD_STATIC_LIBRARY)
140
141 ###
142 ### wificond unit tests.
143 ###
144 include $(CLEAR_VARS)
145 LOCAL_MODULE := wificond_unit_test
146 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
147 LOCAL_C_INCLUDES := $(wificond_includes)
148 LOCAL_SRC_FILES := \
149     tests/ap_interface_impl_unittest.cpp \
150     tests/client_interface_impl_unittest.cpp \
151     tests/looper_backed_event_loop_unittest.cpp \
152     tests/main.cpp \
153     tests/mock_netlink_manager.cpp \
154     tests/mock_netlink_utils.cpp \
155     tests/mock_scan_utils.cpp \
156     tests/netlink_manager_unittest.cpp \
157     tests/netlink_utils_unittest.cpp \
158     tests/nl80211_attribute_unittest.cpp \
159     tests/nl80211_packet_unittest.cpp \
160     tests/scan_result_unittest.cpp \
161     tests/scan_settings_unittest.cpp \
162     tests/server_unittest.cpp
163 LOCAL_STATIC_LIBRARIES := \
164     libgmock \
165     libgtest \
166     libwifi-hal-test \
167     libwifi-system-test \
168     libwificond \
169     libwificond_nl
170 LOCAL_SHARED_LIBRARIES := \
171     libbase \
172     libbinder \
173     liblog \
174     libutils \
175     libwifi-hal \
176     libwifi-system
177 include $(BUILD_NATIVE_TEST)
178
179 ###
180 ### wificond device integration tests.
181 ###
182 include $(CLEAR_VARS)
183 LOCAL_MODULE := wificond_integration_test
184 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
185 LOCAL_C_INCLUDES := $(wificond_includes)
186 LOCAL_SRC_FILES := \
187     tests/integration/ap_interface_test.cpp \
188     tests/integration/client_interface_test.cpp \
189     tests/integration/life_cycle_test.cpp \
190     tests/integration/scanner_test.cpp \
191     tests/integration/service_test.cpp \
192     tests/main.cpp \
193     tests/shell_unittest.cpp
194 LOCAL_SHARED_LIBRARIES := \
195     libbase \
196     libbinder \
197     libcutils \
198     libutils \
199     libwifi-system
200 LOCAL_STATIC_LIBRARIES := \
201     libgmock \
202     libwificond_ipc \
203     libwificond_test_utils
204 include $(BUILD_NATIVE_TEST)
205
206 ###
207 ### wpa_supplicant binder integration tests.
208 ### (Compiled only when wpa_supplicant's binder interface is enabled)
209 ###
210 ifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
211 include $(CLEAR_VARS)
212 LOCAL_MODULE := wpa_supplicant_binder_test
213 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
214 LOCAL_SRC_FILES := \
215     tests/integration/wpa_supplicant_binder/connect_tests.cpp \
216     tests/integration/wpa_supplicant_binder/main.cpp \
217     tests/integration/wpa_supplicant_binder/network_params.cpp \
218     tests/integration/wpa_supplicant_binder/test_base.cpp \
219     tests/integration/wpa_supplicant_binder/tests.cpp
220 LOCAL_SHARED_LIBRARIES := \
221     libbase \
222     libbinder \
223     libcutils \
224     libutils \
225     libwifi-hal \
226     libwifi-system
227 LOCAL_STATIC_LIBRARIES := \
228     libgmock \
229     libjsoncpp \
230     libwificond_test_utils \
231     libwpa_binder_interface
232 include $(BUILD_NATIVE_TEST)
233 endif # WPA_SUPPLICANT_USE_BINDER == y