diff options
author | Christopher Wiley <wiley@google.com> | 2016-06-15 12:54:12 -0700 |
---|---|---|
committer | Christopher Wiley <wiley@google.com> | 2016-06-16 10:17:14 -0700 |
commit | 189a1eff9eef200cab7a61e5bf6e9865bfa46ce4 (patch) | |
tree | 18c29c91d8bcf2ce53750f02525bfc4c138e1d98 /libwifi_hal/Android.mk | |
parent | 051a0607b6b2f1ad058f048e2a104e4ebe36c730 (diff) | |
download | android_frameworks_opt_net_wifi-189a1eff9eef200cab7a61e5bf6e9865bfa46ce4.tar.gz android_frameworks_opt_net_wifi-189a1eff9eef200cab7a61e5bf6e9865bfa46ce4.tar.bz2 android_frameworks_opt_net_wifi-189a1eff9eef200cab7a61e5bf6e9865bfa46ce4.zip |
Wrap vendor provided HAL in libwifi-hal
While here, fix the include paths so that we explicitly refer to the
headers in hardware_legacy.
Bug: 29396611
Test: Compiles, can associate to an AP on angler/bullhead
Test: runtest frameworks-wifi continues to pass
Change-Id: Ic76ce613b80eb9b3200699c5e1dd083a43e2b1c5
Diffstat (limited to 'libwifi_hal/Android.mk')
-rw-r--r-- | libwifi_hal/Android.mk | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/libwifi_hal/Android.mk b/libwifi_hal/Android.mk new file mode 100644 index 000000000..e83c25e47 --- /dev/null +++ b/libwifi_hal/Android.mk @@ -0,0 +1,65 @@ +# 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) +ifneq ($(TARGET_BUILD_PDK), true) + +# A fallback "vendor" HAL library. +# Don't link this, link libwifi-hal. +# ============================================================ +include $(CLEAR_VARS) +LOCAL_MODULE := libwifi-hal-fallback +LOCAL_CFLAGS := \ + -Wall \ + -Werror \ + -Wextra \ + -Winit-self \ + -Wno-unused-function \ + -Wno-unused-parameter \ + -Wshadow \ + -Wunused-variable \ + -Wwrite-strings +LOCAL_SRC_FILES := wifi_hal_fallback.cpp +LOCAL_C_INCLUDES := $(call include-path-for, libhardware_legacy) +include $(BUILD_STATIC_LIBRARY) + +# Pick a vendor provided HAL implementation library. +# ============================================================ +LIB_WIFI_HAL := libwifi-hal-fallback +ifeq ($(BOARD_WLAN_DEVICE), bcmdhd) + LIB_WIFI_HAL := libwifi-hal-bcm +else ifeq ($(BOARD_WLAN_DEVICE), qcwcn) + LIB_WIFI_HAL := libwifi-hal-qcom +else ifeq ($(BOARD_WLAN_DEVICE), mrvl) + # this is commented because none of the nexus devices + # that sport Marvell's wifi have support for HAL + # LIB_WIFI_HAL := libwifi-hal-mrvl +else ifeq ($(BOARD_WLAN_DEVICE), MediaTek) + # support MTK WIFI HAL + LIB_WIFI_HAL := libwifi-hal-mt66xx +endif + +# The WiFi HAL that you should be linking. +# ============================================================ +include $(CLEAR_VARS) +LOCAL_MODULE := libwifi-hal +LOCAL_EXPORT_C_INCLUDE_DIRS := $(call include-path-for, libhardware_legacy) +LOCAL_SHARED_LIBRARIES := \ + liblog \ + libnl \ + libutils +LOCAL_WHOLE_STATIC_LIBRARIES := $(LIB_WIFI_HAL) +include $(BUILD_SHARED_LIBRARY) + +endif |