summaryrefslogtreecommitdiffstats
blob: a5dc6e0abcc869c8b6e3145cee1145469af72cee (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_PATH := $(call my-dir)
wificond_cpp_flags := -Wall -Werror -Wno-unused-parameter
ifdef WIFI_OFFLOAD_SCANS
wificond_cpp_flags += -DWIFI_OFFLOAD_SCANS=\"$(WIFI_OFFLOAD_SCANS)\"
endif
wificond_parent_dir := $(LOCAL_PATH)/../
wificond_includes := \
    $(wificond_parent_dir)


###
### wificond daemon.
###
include $(CLEAR_VARS)
LOCAL_MODULE := wificond
LOCAL_CPPFLAGS := $(wificond_cpp_flags)
LOCAL_INIT_RC := wificond.rc
LOCAL_C_INCLUDES := $(wificond_includes)
LOCAL_SRC_FILES := \
    main.cpp
LOCAL_SHARED_LIBRARIES := \
    android.hardware.wifi.offload@1.0 \
    libbinder \
    libbase \
    libcutils \
    libhidlbase \
    libhwbinder \
    libhidltransport \
    libminijail \
    libutils \
    libwifi-system \
    libwifi-system-iface
LOCAL_STATIC_LIBRARIES := \
    libwificond
include $(BUILD_EXECUTABLE)

###
### wificond static library
###
include $(CLEAR_VARS)
LOCAL_MODULE := libwificond
LOCAL_CPPFLAGS := $(wificond_cpp_flags)
LOCAL_C_INCLUDES := $(wificond_includes)
LOCAL_SRC_FILES := \
    ap_interface_binder.cpp \
    ap_interface_impl.cpp \
    client_interface_binder.cpp \
    client_interface_impl.cpp \
    logging_utils.cpp \
    looper_backed_event_loop.cpp \
    rtt/rtt_controller_binder.cpp \
    rtt/rtt_controller_impl.cpp \
    scanning/channel_settings.cpp \
    scanning/hidden_network.cpp \
    scanning/pno_network.cpp \
    scanning/pno_settings.cpp \
    scanning/scan_result.cpp \
    scanning/offload/scan_stats.cpp \
    scanning/single_scan_settings.cpp \
    scanning/scan_utils.cpp \
    scanning/scanner_impl.cpp \
    scanning/offload/offload_scan_manager.cpp \
    scanning/offload/offload_callback.cpp \
    scanning/offload/offload_service_utils.cpp \
    scanning/offload/offload_scan_utils.cpp \
    server.cpp
LOCAL_SHARED_LIBRARIES := \
    android.hardware.wifi.offload@1.0 \
    libbase \
    libutils \
    libhidlbase \
    libhwbinder \
    libhidltransport \
    libwifi-system \
    libwifi-system-iface
LOCAL_WHOLE_STATIC_LIBRARIES := \
    libwificond_ipc \
    libwificond_nl
include $(BUILD_STATIC_LIBRARY)

###
### wificond netlink library
###
include $(CLEAR_VARS)
LOCAL_MODULE := libwificond_nl
LOCAL_CPPFLAGS := $(wificond_cpp_flags)
LOCAL_C_INCLUDES := $(wificond_includes)
LOCAL_SRC_FILES := \
    net/mlme_event.cpp \
    net/netlink_manager.cpp \
    net/netlink_utils.cpp \
    net/nl80211_attribute.cpp \
    net/nl80211_packet.cpp
LOCAL_SHARED_LIBRARIES := \
    libbase
include $(BUILD_STATIC_LIBRARY)

###
### wificond IPC interface library
###
include $(CLEAR_VARS)
LOCAL_MODULE := libwificond_ipc
LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/aidl
LOCAL_C_INCLUDES := $(wificond_includes)
LOCAL_CPPFLAGS := $(wificond_cpp_flags)
LOCAL_SRC_FILES := \
    ipc_constants.cpp \
    aidl/android/net/wifi/IApInterface.aidl \
    aidl/android/net/wifi/IANQPDoneCallback.aidl \
    aidl/android/net/wifi/IClientInterface.aidl \
    aidl/android/net/wifi/IInterfaceEventCallback.aidl \
    aidl/android/net/wifi/IPnoScanEvent.aidl \
    aidl/android/net/wifi/IRttClient.aidl \
    aidl/android/net/wifi/IRttController.aidl \
    aidl/android/net/wifi/IScanEvent.aidl \
    aidl/android/net/wifi/IWificond.aidl \
    aidl/android/net/wifi/IWifiScannerImpl.aidl \
    scanning/channel_settings.cpp \
    scanning/hidden_network.cpp \
    scanning/pno_network.cpp \
    scanning/pno_settings.cpp \
    scanning/scan_result.cpp \
    scanning/single_scan_settings.cpp
LOCAL_SHARED_LIBRARIES := \
    libbinder
include $(BUILD_STATIC_LIBRARY)

###
### test util library
###
include $(CLEAR_VARS)
LOCAL_MODULE := libwificond_test_utils
LOCAL_CPPFLAGS := $(wificond_cpp_flags)
LOCAL_C_INCLUDES := $(wificond_includes)
LOCAL_SRC_FILES := \
    looper_backed_event_loop.cpp \
    tests/integration/binder_dispatcher.cpp \
    tests/integration/process_utils.cpp \
    tests/shell_utils.cpp
LOCAL_SHARED_LIBRARIES := \
    libbase
LOCAL_WHOLE_STATIC_LIBRARIES := \
    libwificond_ipc
include $(BUILD_STATIC_LIBRARY)

###
### wificond unit tests.
###
include $(CLEAR_VARS)
LOCAL_MODULE := wificond_unit_test
LOCAL_COMPATIBILITY_SUITE := device-tests
LOCAL_CPPFLAGS := $(wificond_cpp_flags)
LOCAL_C_INCLUDES := $(wificond_includes)
LOCAL_SRC_FILES := \
    tests/ap_interface_impl_unittest.cpp \
    tests/client_interface_impl_unittest.cpp \
    tests/looper_backed_event_loop_unittest.cpp \
    tests/main.cpp \
    tests/mock_client_interface_impl.cpp \
    tests/mock_netlink_manager.cpp \
    tests/mock_netlink_utils.cpp \
    tests/mock_offload.cpp \
    tests/mock_offload_callback_handlers.cpp \
    tests/mock_offload_service_utils.cpp \
    tests/mock_scan_utils.cpp \
    tests/netlink_manager_unittest.cpp \
    tests/netlink_utils_unittest.cpp \
    tests/nl80211_attribute_unittest.cpp \
    tests/nl80211_packet_unittest.cpp \
    tests/offload_callback_test.cpp \
    tests/offload_hal_test_constants.cpp \
    tests/offload_scan_manager_test.cpp \
    tests/offload_scan_utils_test.cpp \
    tests/offload_test_utils.cpp \
    tests/scanner_unittest.cpp \
    tests/scan_result_unittest.cpp \
    tests/scan_settings_unittest.cpp \
    tests/scan_stats_unittest.cpp \
    tests/scan_utils_unittest.cpp \
    tests/server_unittest.cpp
LOCAL_STATIC_LIBRARIES := \
    libgmock \
    libgtest \
    libwifi-system-test \
    libwifi-system-iface-test \
    libwificond \
    libwificond_nl
LOCAL_SHARED_LIBRARIES := \
    android.hardware.wifi.offload@1.0 \
    libbase \
    libbinder \
    libhidltransport \
    libhidlbase \
    libhwbinder \
    liblog \
    libutils \
    libwifi-system \
    libwifi-system-iface
include $(BUILD_NATIVE_TEST)

###
### wificond device integration tests.
###
include $(CLEAR_VARS)
LOCAL_MODULE := wificond_integration_test
LOCAL_CPPFLAGS := $(wificond_cpp_flags)
LOCAL_C_INCLUDES := $(wificond_includes)
LOCAL_SRC_FILES := \
    tests/integration/ap_interface_test.cpp \
    tests/integration/client_interface_test.cpp \
    tests/integration/life_cycle_test.cpp \
    tests/integration/scanner_test.cpp \
    tests/integration/service_test.cpp \
    tests/main.cpp \
    tests/shell_unittest.cpp
LOCAL_SHARED_LIBRARIES := \
    libbase \
    libbinder \
    libcutils \
    libutils \
    libwifi-system \
    libwifi-system-iface
LOCAL_STATIC_LIBRARIES := \
    libgmock \
    libwificond_ipc \
    libwificond_test_utils
include $(BUILD_NATIVE_TEST)