1# Copyright (C) 2011 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
15LOCAL_PATH := $(call my-dir)
16
17# Make the HAL library
18# ============================================================
19include $(CLEAR_VARS)
20
21LOCAL_CFLAGS := -Wno-unused-parameter
22ifeq ($(TARGET_BUILD_VARIANT),userdebug)
23LOCAL_CFLAGS += "-DLOG_NDEBUG=0"
24endif
25
26# gscan.cpp: address of array 'cached_results[i].results' will always evaluate to 'true'
27LOCAL_CLANG_CFLAGS := -Wno-pointer-bool-conversion
28
29LOCAL_CFLAGS += -Wall -Werror
30
31LOCAL_C_INCLUDES += \
32	$(LOCAL_PATH) \
33	external/libnl/include \
34	$(call include-path-for, libhardware_legacy)/hardware_legacy \
35	external/wpa_supplicant_8/src/drivers \
36	$(TARGET_OUT_HEADERS)/libwpa_client \
37	$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
38	$(TARGET_OUT_HEADERS)/cld80211-lib
39
40LOCAL_SRC_FILES := \
41	wifi_hal.cpp \
42	common.cpp \
43	cpp_bindings.cpp \
44	llstats.cpp \
45	gscan.cpp \
46	gscan_event_handler.cpp \
47	rtt.cpp \
48	ifaceeventhandler.cpp \
49	tdls.cpp \
50	nan.cpp \
51	nan_ind.cpp \
52	nan_req.cpp \
53	nan_rsp.cpp \
54	wificonfig.cpp \
55	wifilogger.cpp \
56	wifilogger_diag.cpp \
57	ring_buffer.cpp \
58	rb_wrapper.cpp \
59	rssi_monitor.cpp \
60	roam.cpp \
61	radio_mode.cpp
62
63LOCAL_MODULE := libwifi-hal-qcom
64LOCAL_VENDOR_MODULE := true
65LOCAL_CLANG := true
66LOCAL_SHARED_LIBRARIES += libnetutils liblog libwpa_client libcld80211
67
68ifneq ($(wildcard external/libnl),)
69LOCAL_SHARED_LIBRARIES += libnl
70LOCAL_C_INCLUDES += external/libnl/include
71else
72LOCAL_SHARED_LIBRARIES += libnl_2
73LOCAL_C_INCLUDES += external/libnl-headers
74endif
75
76LOCAL_HEADER_LIBRARIES := libcutils_headers libutils_headers
77
78include $(BUILD_STATIC_LIBRARY)
79
80include $(CLEAR_VARS)
81
82LOCAL_REQUIRED_MODULES :=
83
84LOCAL_CFLAGS += -Wno-unused-parameter -Wall -Werror
85LOCAL_CPPFLAGS += -Wno-conversion-null
86ifeq ($(TARGET_BUILD_VARIANT),userdebug)
87LOCAL_CFLAGS += "-DLOG_NDEBUG=0"
88endif
89
90# gscan.cpp: address of array 'cached_results[i].results' will always evaluate to 'true'
91LOCAL_CLANG_CFLAGS := -Wno-pointer-bool-conversion
92
93LOCAL_C_INCLUDES += \
94	$(LOCAL_PATH) \
95	external/libnl/include \
96	$(call include-path-for, libhardware_legacy)/hardware_legacy \
97	external/wpa_supplicant_8/src/drivers \
98	$(TARGET_OUT_HEADERS)/libwpa_client \
99	$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include \
100	$(TARGET_OUT_HEADERS)/cld80211-lib
101
102LOCAL_SRC_FILES := \
103	wifi_hal.cpp \
104	common.cpp \
105	cpp_bindings.cpp \
106	llstats.cpp \
107	gscan.cpp \
108	gscan_event_handler.cpp \
109	rtt.cpp \
110	ifaceeventhandler.cpp \
111	tdls.cpp \
112	nan.cpp \
113	nan_ind.cpp \
114	nan_req.cpp \
115	nan_rsp.cpp \
116	wificonfig.cpp \
117	wifilogger.cpp \
118	wifilogger_diag.cpp \
119	ring_buffer.cpp \
120	rb_wrapper.cpp \
121	rssi_monitor.cpp \
122	roam.cpp \
123	radio_mode.cpp
124
125LOCAL_CFLAGS += -Wall -Werror
126LOCAL_MODULE := libwifi-hal-qcom
127LOCAL_VENDOR_MODULE := true
128LOCAL_CLANG := true
129LOCAL_SHARED_LIBRARIES += libnetutils liblog
130LOCAL_SHARED_LIBRARIES += libdl libwpa_client libcld80211
131
132ifneq ($(wildcard external/libnl),)
133LOCAL_SHARED_LIBRARIES += libnl
134LOCAL_C_INCLUDES += external/libnl/include
135else
136LOCAL_SHARED_LIBRARIES += libnl_2
137LOCAL_C_INCLUDES += external/libnl-headers
138endif
139
140LOCAL_HEADER_LIBRARIES := libcutils_headers libutils_headers
141include $(BUILD_SHARED_LIBRARY)
142