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