OSDN Git Service

Enforce wificond scanner capability checks am: 4adb05f87e am: 25d2f8694b am: 4351214342
[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-hal \
39     libwifi-system
40 LOCAL_STATIC_LIBRARIES := \
41     libwificond
42 include $(BUILD_EXECUTABLE)
43
44 ###
45 ### wificond static library
46 ###
47 include $(CLEAR_VARS)
48 LOCAL_MODULE := libwificond
49 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
50 LOCAL_C_INCLUDES := $(wificond_includes)
51 LOCAL_SRC_FILES := \
52     ap_interface_binder.cpp \
53     ap_interface_impl.cpp \
54     client_interface_binder.cpp \
55     client_interface_impl.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-hal \
72     libwifi-system
73 LOCAL_WHOLE_STATIC_LIBRARIES := \
74     libwificond_ipc \
75     libwificond_nl
76 include $(BUILD_STATIC_LIBRARY)
77
78 ###
79 ### wificond netlink library
80 ###
81 include $(CLEAR_VARS)
82 LOCAL_MODULE := libwificond_nl
83 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
84 LOCAL_C_INCLUDES := $(wificond_includes)
85 LOCAL_SRC_FILES := \
86     net/mlme_event.cpp \
87     net/netlink_manager.cpp \
88     net/netlink_utils.cpp \
89     net/nl80211_attribute.cpp \
90     net/nl80211_packet.cpp
91 LOCAL_SHARED_LIBRARIES := \
92     libbase
93 include $(BUILD_STATIC_LIBRARY)
94
95 ###
96 ### wificond IPC interface library
97 ###
98 include $(CLEAR_VARS)
99 LOCAL_MODULE := libwificond_ipc
100 LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/aidl
101 LOCAL_C_INCLUDES := $(wificond_includes)
102 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
103 LOCAL_SRC_FILES := \
104     ipc_constants.cpp \
105     aidl/android/net/wifi/IApInterface.aidl \
106     aidl/android/net/wifi/IANQPDoneCallback.aidl \
107     aidl/android/net/wifi/IClientInterface.aidl \
108     aidl/android/net/wifi/IInterfaceEventCallback.aidl \
109     aidl/android/net/wifi/IPnoScanEvent.aidl \
110     aidl/android/net/wifi/IRttClient.aidl \
111     aidl/android/net/wifi/IRttController.aidl \
112     aidl/android/net/wifi/IScanEvent.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/pno_network.cpp \
118     scanning/pno_settings.cpp \
119     scanning/scan_result.cpp \
120     scanning/single_scan_settings.cpp
121 LOCAL_SHARED_LIBRARIES := \
122     libbinder
123 include $(BUILD_STATIC_LIBRARY)
124
125 ###
126 ### test util library
127 ###
128 include $(CLEAR_VARS)
129 LOCAL_MODULE := libwificond_test_utils
130 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
131 LOCAL_C_INCLUDES := $(wificond_includes)
132 LOCAL_SRC_FILES := \
133     looper_backed_event_loop.cpp \
134     tests/integration/binder_dispatcher.cpp \
135     tests/integration/process_utils.cpp \
136     tests/shell_utils.cpp
137 LOCAL_SHARED_LIBRARIES := \
138     libbase
139 LOCAL_WHOLE_STATIC_LIBRARIES := \
140     libwificond_ipc
141 include $(BUILD_STATIC_LIBRARY)
142
143 ###
144 ### wificond unit tests.
145 ###
146 include $(CLEAR_VARS)
147 LOCAL_MODULE := wificond_unit_test
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-hal-test \
170     libwifi-system-test \
171     libwificond \
172     libwificond_nl
173 LOCAL_SHARED_LIBRARIES := \
174     libbase \
175     libbinder \
176     liblog \
177     libutils \
178     libwifi-hal \
179     libwifi-system
180 include $(BUILD_NATIVE_TEST)
181
182 ###
183 ### wificond device integration tests.
184 ###
185 include $(CLEAR_VARS)
186 LOCAL_MODULE := wificond_integration_test
187 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
188 LOCAL_C_INCLUDES := $(wificond_includes)
189 LOCAL_SRC_FILES := \
190     tests/integration/ap_interface_test.cpp \
191     tests/integration/client_interface_test.cpp \
192     tests/integration/life_cycle_test.cpp \
193     tests/integration/scanner_test.cpp \
194     tests/integration/service_test.cpp \
195     tests/main.cpp \
196     tests/shell_unittest.cpp
197 LOCAL_SHARED_LIBRARIES := \
198     libbase \
199     libbinder \
200     libcutils \
201     libutils \
202     libwifi-system
203 LOCAL_STATIC_LIBRARIES := \
204     libgmock \
205     libwificond_ipc \
206     libwificond_test_utils
207 include $(BUILD_NATIVE_TEST)
208
209 ###
210 ### wpa_supplicant binder integration tests.
211 ### (Compiled only when wpa_supplicant's binder interface is enabled)
212 ###
213 ifeq ($(WPA_SUPPLICANT_USE_BINDER), y)
214 include $(CLEAR_VARS)
215 LOCAL_MODULE := wpa_supplicant_binder_test
216 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
217 LOCAL_SRC_FILES := \
218     tests/integration/wpa_supplicant_binder/connect_tests.cpp \
219     tests/integration/wpa_supplicant_binder/main.cpp \
220     tests/integration/wpa_supplicant_binder/network_params.cpp \
221     tests/integration/wpa_supplicant_binder/test_base.cpp \
222     tests/integration/wpa_supplicant_binder/tests.cpp
223 LOCAL_SHARED_LIBRARIES := \
224     libbase \
225     libbinder \
226     libcutils \
227     libutils \
228     libwifi-hal \
229     libwifi-system
230 LOCAL_STATIC_LIBRARIES := \
231     libgmock \
232     libjsoncpp \
233     libwificond_test_utils \
234     libwpa_binder_interface
235 include $(BUILD_NATIVE_TEST)
236 endif # WPA_SUPPLICANT_USE_BINDER == y