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 55endif 56 57# Build the HalUtil 58# ============================================================ 59 60include $(CLEAR_VARS) 61 62LOCAL_REQUIRED_MODULES := libandroid_runtime libhardware_legacy 63 64LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast 65LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses 66LOCAL_CPPFLAGS += -Wno-conversion-null 67 68LOCAL_C_INCLUDES += \ 69 $(call include-path-for, libhardware)/hardware \ 70 $(call include-path-for, libhardware_legacy)/hardware_legacy \ 71 libcore/include 72 73LOCAL_SHARED_LIBRARIES += \ 74 libcutils \ 75 libnl \ 76 libandroid_runtime \ 77 libutils 78 79LOCAL_STATIC_LIBRARIES += $(LIB_WIFI_HAL) 80 81LOCAL_SRC_FILES := \ 82 tools/halutil/halutil.cpp 83 84LOCAL_MODULE := halutil 85 86include $(BUILD_EXECUTABLE) 87 88# Make the JNI part 89# ============================================================ 90include $(CLEAR_VARS) 91 92LOCAL_REQUIRED_MODULES := libandroid_runtime libhardware_legacy 93 94LOCAL_CFLAGS += -Wno-unused-parameter -Wno-int-to-pointer-cast 95LOCAL_CFLAGS += -Wno-maybe-uninitialized -Wno-parentheses 96LOCAL_CPPFLAGS += -Wno-conversion-null 97 98LOCAL_C_INCLUDES += \ 99 $(JNI_H_INCLUDE) \ 100 $(call include-path-for, libhardware)/hardware \ 101 $(call include-path-for, libhardware_legacy)/hardware_legacy \ 102 libcore/include 103 104LOCAL_SHARED_LIBRARIES += \ 105 libnativehelper \ 106 libcutils \ 107 libutils \ 108 libhardware \ 109 libhardware_legacy \ 110 libandroid_runtime \ 111 libnl 112 113LOCAL_STATIC_LIBRARIES += $(LIB_WIFI_HAL) 114 115LOCAL_SRC_FILES := \ 116 jni/com_android_server_wifi_WifiNative.cpp \ 117 jni/jni_helper.cpp 118 119LOCAL_MODULE := libwifi-service 120 121include $(BUILD_SHARED_LIBRARY) 122 123# Build the java code 124# ============================================================ 125 126include $(CLEAR_VARS) 127 128LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/java 129LOCAL_SRC_FILES := $(call all-java-files-under, java) \ 130 $(call all-Iaidl-files-under, java) \ 131 $(call all-logtags-files-under, java) 132 133LOCAL_JNI_SHARED_LIBRARIES := libandroid_runtime 134LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt services 135LOCAL_STATIC_JAVA_LIBRARIES := ksoap2 136LOCAL_REQUIRED_MODULES := services 137LOCAL_MODULE_TAGS := 138LOCAL_MODULE := wifi-service 139 140include $(BUILD_JAVA_LIBRARY) 141 142endif 143