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 17ifneq ($(TARGET_BUILD_PDK), true) 18 19# Make HAL stub library 20# ============================================================ 21 22include $(CLEAR_VARS) 23 24LOCAL_REQUIRED_MODULES := 25 26LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast 27LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses 28LOCAL_CPPFLAGS += -Wno-conversion-null 29 30LOCAL_C_INCLUDES += \ 31 external/libnl-headers \ 32 $(call include-path-for, libhardware_legacy)/hardware_legacy 33 34LOCAL_SRC_FILES := \ 35 lib/wifi_hal.cpp 36 37LOCAL_MODULE := libwifi-hal 38 39include $(BUILD_STATIC_LIBRARY) 40 41# set correct hal library path 42# ============================================================ 43LIB_WIFI_HAL := libwifi-hal 44 45ifeq ($(BOARD_WLAN_DEVICE), bcmdhd) 46 LIB_WIFI_HAL := libwifi-hal-bcm 47else ifeq ($(BOARD_WLAN_DEVICE), qcwcn) 48 # this is commented because none of the nexus devices 49 # that sport Qualcomm's wifi have support for HAL 50 # LIB_WIFI_HAL := libwifi-hal-qcom 51else ifeq ($(BOARD_WLAN_DEVICE), mrvl) 52 # this is commented because none of the nexus devices 53 # that sport Marvell's wifi have support for HAL 54 # LIB_WIFI_HAL := libwifi-hal-mrvl 55else ifeq ($(BOARD_WLAN_DEVICE), MediaTek) 56 # support MTK WIFI HAL 57 LIB_WIFI_HAL := libwifi-hal-mt66xx 58endif 59 60# Build the HalUtil 61# ============================================================ 62 63include $(CLEAR_VARS) 64 65LOCAL_REQUIRED_MODULES := libandroid_runtime libhardware_legacy 66 67LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast 68LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses 69LOCAL_CPPFLAGS += -Wno-conversion-null 70 71LOCAL_C_INCLUDES += \ 72 $(call include-path-for, libhardware)/hardware \ 73 $(call include-path-for, libhardware_legacy)/hardware_legacy \ 74 libcore/include 75 76LOCAL_SHARED_LIBRARIES += \ 77 libcutils \ 78 libnl \ 79 libandroid_runtime \ 80 libutils 81 82LOCAL_STATIC_LIBRARIES += $(LIB_WIFI_HAL) 83 84LOCAL_SRC_FILES := \ 85 tools/halutil/halutil.cpp 86 87LOCAL_MODULE := halutil 88 89include $(BUILD_EXECUTABLE) 90 91# Make the JNI part 92# ============================================================ 93include $(CLEAR_VARS) 94 95LOCAL_REQUIRED_MODULES := libandroid_runtime libhardware_legacy 96 97LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast 98LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses 99LOCAL_CPPFLAGS += -Wno-conversion-null 100 101LOCAL_C_INCLUDES += \ 102 $(JNI_H_INCLUDE) \ 103 $(call include-path-for, libhardware)/hardware \ 104 $(call include-path-for, libhardware_legacy)/hardware_legacy \ 105 libcore/include 106 107LOCAL_SHARED_LIBRARIES += \ 108 libnativehelper \ 109 libcutils \ 110 libutils \ 111 libhardware \ 112 libhardware_legacy \ 113 libandroid_runtime \ 114 libnl 115 116LOCAL_STATIC_LIBRARIES += $(LIB_WIFI_HAL) 117 118LOCAL_SRC_FILES := \ 119 jni/com_android_server_wifi_WifiNative.cpp \ 120 jni/jni_helper.cpp 121 122LOCAL_MODULE := libwifi-service 123 124include $(BUILD_SHARED_LIBRARY) 125 126# Build the java code 127# ============================================================ 128 129include $(CLEAR_VARS) 130 131LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/java 132LOCAL_SRC_FILES := $(call all-java-files-under, java) \ 133 $(call all-Iaidl-files-under, java) \ 134 $(call all-logtags-files-under, java) 135 136LOCAL_JNI_SHARED_LIBRARIES := libandroid_runtime 137LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt services 138LOCAL_STATIC_JAVA_LIBRARIES := ksoap2 139LOCAL_REQUIRED_MODULES := services 140LOCAL_MODULE_TAGS := 141LOCAL_MODULE := wifi-service 142 143include $(BUILD_JAVA_LIBRARY) 144 145endif 146