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