OSDN Git Service

Conditional compile flags not allowed in BoardConfig
[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     android.hardware.wifi.offload@1.0 \
34     libbinder \
35     libbase \
36     libcutils \
37     libhidlbase \
38     libhwbinder \
39     libhidltransport \
40     libminijail \
41     libutils \
42     libwifi-system \
43     libwifi-system-iface
44 LOCAL_STATIC_LIBRARIES := \
45     libwificond
46 include $(BUILD_EXECUTABLE)
47
48 ###
49 ### wificond static library
50 ###
51 include $(CLEAR_VARS)
52 LOCAL_MODULE := libwificond
53 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
54 LOCAL_C_INCLUDES := $(wificond_includes)
55 LOCAL_SRC_FILES := \
56     ap_interface_binder.cpp \
57     ap_interface_impl.cpp \
58     client_interface_binder.cpp \
59     client_interface_impl.cpp \
60     logging_utils.cpp \
61     looper_backed_event_loop.cpp \
62     rtt/rtt_controller_binder.cpp \
63     rtt/rtt_controller_impl.cpp \
64     scanning/channel_settings.cpp \
65     scanning/hidden_network.cpp \
66     scanning/offload_scan_callback_interface_impl.cpp \
67     scanning/pno_network.cpp \
68     scanning/pno_settings.cpp \
69     scanning/scan_result.cpp \
70     scanning/offload/scan_stats.cpp \
71     scanning/single_scan_settings.cpp \
72     scanning/scan_utils.cpp \
73     scanning/scanner_impl.cpp \
74     scanning/offload/offload_scan_manager.cpp \
75     scanning/offload/offload_callback.cpp \
76     scanning/offload/offload_service_utils.cpp \
77     scanning/offload/offload_scan_utils.cpp \
78     server.cpp
79 LOCAL_SHARED_LIBRARIES := \
80     android.hardware.wifi.offload@1.0 \
81     libbase \
82     libutils \
83     libhidlbase \
84     libhwbinder \
85     libhidltransport \
86     libwifi-system \
87     libwifi-system-iface
88 LOCAL_WHOLE_STATIC_LIBRARIES := \
89     libwificond_ipc \
90     libwificond_nl
91 include $(BUILD_STATIC_LIBRARY)
92
93 ###
94 ### wificond netlink library
95 ###
96 include $(CLEAR_VARS)
97 LOCAL_MODULE := libwificond_nl
98 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
99 LOCAL_C_INCLUDES := $(wificond_includes)
100 LOCAL_SRC_FILES := \
101     net/mlme_event.cpp \
102     net/netlink_manager.cpp \
103     net/netlink_utils.cpp \
104     net/nl80211_attribute.cpp \
105     net/nl80211_packet.cpp
106 LOCAL_SHARED_LIBRARIES := \
107     libbase
108 include $(BUILD_STATIC_LIBRARY)
109
110 ###
111 ### wificond IPC interface library
112 ###
113 include $(CLEAR_VARS)
114 LOCAL_MODULE := libwificond_ipc
115 LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/aidl
116 LOCAL_C_INCLUDES := $(wificond_includes)
117 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
118 LOCAL_SRC_FILES := \
119     ipc_constants.cpp \
120     aidl/android/net/wifi/IApInterface.aidl \
121     aidl/android/net/wifi/IANQPDoneCallback.aidl \
122     aidl/android/net/wifi/IClientInterface.aidl \
123     aidl/android/net/wifi/IInterfaceEventCallback.aidl \
124     aidl/android/net/wifi/IPnoScanEvent.aidl \
125     aidl/android/net/wifi/IRttClient.aidl \
126     aidl/android/net/wifi/IRttController.aidl \
127     aidl/android/net/wifi/IScanEvent.aidl \
128     aidl/android/net/wifi/IWificond.aidl \
129     aidl/android/net/wifi/IWifiScannerImpl.aidl \
130     scanning/channel_settings.cpp \
131     scanning/hidden_network.cpp \
132     scanning/pno_network.cpp \
133     scanning/pno_settings.cpp \
134     scanning/scan_result.cpp \
135     scanning/single_scan_settings.cpp
136 LOCAL_SHARED_LIBRARIES := \
137     libbinder
138 include $(BUILD_STATIC_LIBRARY)
139
140 ###
141 ### test util library
142 ###
143 include $(CLEAR_VARS)
144 LOCAL_MODULE := libwificond_test_utils
145 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
146 LOCAL_C_INCLUDES := $(wificond_includes)
147 LOCAL_SRC_FILES := \
148     looper_backed_event_loop.cpp \
149     tests/integration/binder_dispatcher.cpp \
150     tests/integration/process_utils.cpp \
151     tests/shell_utils.cpp
152 LOCAL_SHARED_LIBRARIES := \
153     libbase
154 LOCAL_WHOLE_STATIC_LIBRARIES := \
155     libwificond_ipc
156 include $(BUILD_STATIC_LIBRARY)
157
158 ###
159 ### wificond unit tests.
160 ###
161 include $(CLEAR_VARS)
162 LOCAL_MODULE := wificond_unit_test
163 LOCAL_COMPATIBILITY_SUITE := device-tests
164 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
165 LOCAL_C_INCLUDES := $(wificond_includes)
166 LOCAL_SRC_FILES := \
167     tests/ap_interface_impl_unittest.cpp \
168     tests/client_interface_impl_unittest.cpp \
169     tests/looper_backed_event_loop_unittest.cpp \
170     tests/main.cpp \
171     tests/mock_client_interface_impl.cpp \
172     tests/mock_netlink_manager.cpp \
173     tests/mock_netlink_utils.cpp \
174     tests/mock_offload.cpp \
175     tests/mock_offload_callback_handlers.cpp \
176     tests/mock_offload_scan_callback_interface.cpp \
177     tests/mock_offload_scan_callback_interface_impl.cpp \
178     tests/mock_offload_scan_manager.cpp \
179     tests/mock_offload_service_utils.cpp \
180     tests/mock_scan_utils.cpp \
181     tests/netlink_manager_unittest.cpp \
182     tests/netlink_utils_unittest.cpp \
183     tests/nl80211_attribute_unittest.cpp \
184     tests/nl80211_packet_unittest.cpp \
185     tests/offload_callback_test.cpp \
186     tests/offload_hal_test_constants.cpp \
187     tests/offload_scan_manager_test.cpp \
188     tests/offload_scan_utils_test.cpp \
189     tests/offload_test_utils.cpp \
190     tests/scanner_unittest.cpp \
191     tests/scan_result_unittest.cpp \
192     tests/scan_settings_unittest.cpp \
193     tests/scan_stats_unittest.cpp \
194     tests/scan_utils_unittest.cpp \
195     tests/server_unittest.cpp
196 LOCAL_STATIC_LIBRARIES := \
197     libgmock \
198     libgtest \
199     libwifi-system-test \
200     libwifi-system-iface-test \
201     libwificond \
202     libwificond_nl
203 LOCAL_SHARED_LIBRARIES := \
204     android.hardware.wifi.offload@1.0 \
205     libbase \
206     libbinder \
207     libhidltransport \
208     libhidlbase \
209     libhwbinder \
210     liblog \
211     libutils \
212     libwifi-system \
213     libwifi-system-iface
214 include $(BUILD_NATIVE_TEST)
215
216 ###
217 ### wificond device integration tests.
218 ###
219 include $(CLEAR_VARS)
220 LOCAL_MODULE := wificond_integration_test
221 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
222 LOCAL_C_INCLUDES := $(wificond_includes)
223 LOCAL_SRC_FILES := \
224     tests/integration/ap_interface_test.cpp \
225     tests/integration/client_interface_test.cpp \
226     tests/integration/life_cycle_test.cpp \
227     tests/integration/scanner_test.cpp \
228     tests/integration/service_test.cpp \
229     tests/main.cpp \
230     tests/shell_unittest.cpp
231 LOCAL_SHARED_LIBRARIES := \
232     libbase \
233     libbinder \
234     libcutils \
235     libutils \
236     libwifi-system \
237     libwifi-system-iface
238 LOCAL_STATIC_LIBRARIES := \
239     libgmock \
240     libwificond_ipc \
241     libwificond_test_utils
242 include $(BUILD_NATIVE_TEST)