1155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# Copyright (C) 2011 The Android Open Source Project 2155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# 3155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# Licensed under the Apache License, Version 2.0 (the "License"); 4155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# you may not use this file except in compliance with the License. 5155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# You may obtain a copy of the License at 6155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# 7155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# http://www.apache.org/licenses/LICENSE-2.0 8155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# 9155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# Unless required by applicable law or agreed to in writing, software 10155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# distributed under the License is distributed on an "AS IS" BASIS, 11155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# See the License for the specific language governing permissions and 13155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande# limitations under the License. 14155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande 15155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit DeshpandeLOCAL_PATH := $(call my-dir) 16155b9d09ef9b8ead3ca617afdd91e74070d3f0cbVinit Deshpande 17432674aa8fb9cbecac155f2809b55bbcc57c0db6Colin Crossifneq ($(TARGET_BUILD_PDK), true) 18432674aa8fb9cbecac155f2809b55bbcc57c0db6Colin Cross 19ec61e7731968be994a23f2bd138f6761c8aea498xinhe# Make HAL stub library 1 207ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapnde# ============================================================ 2113cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde 227ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapndeinclude $(CLEAR_VARS) 237ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapnde 247ef73dd1b6e43c72b3841723504cd86dc402a134Vinit DeshapndeLOCAL_REQUIRED_MODULES := 257ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapnde 26208f92c4d8457374ff507996d58ffa5586d1ecd5Mitchell WillsLOCAL_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-function \ 27208f92c4d8457374ff507996d58ffa5586d1ecd5Mitchell Wills -Wunused-variable -Winit-self -Wwrite-strings -Wshadow 287ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapnde 297ef73dd1b6e43c72b3841723504cd86dc402a134Vinit DeshapndeLOCAL_C_INCLUDES += \ 3013cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde external/libnl-headers \ 3113cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde $(call include-path-for, libhardware_legacy)/hardware_legacy 327ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapnde 337ef73dd1b6e43c72b3841723504cd86dc402a134Vinit DeshapndeLOCAL_SRC_FILES := \ 3413cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde lib/wifi_hal.cpp 357ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapnde 367ef73dd1b6e43c72b3841723504cd86dc402a134Vinit DeshapndeLOCAL_MODULE := libwifi-hal 377ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapnde 387ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapndeinclude $(BUILD_STATIC_LIBRARY) 397ef73dd1b6e43c72b3841723504cd86dc402a134Vinit Deshapnde 40ec61e7731968be994a23f2bd138f6761c8aea498xinhe# Make HAL stub library 2 41ec61e7731968be994a23f2bd138f6761c8aea498xinhe# ============================================================ 42ec61e7731968be994a23f2bd138f6761c8aea498xinhe 43ec61e7731968be994a23f2bd138f6761c8aea498xinheinclude $(CLEAR_VARS) 44ec61e7731968be994a23f2bd138f6761c8aea498xinhe 45ec61e7731968be994a23f2bd138f6761c8aea498xinheLOCAL_REQUIRED_MODULES := 46ec61e7731968be994a23f2bd138f6761c8aea498xinhe 47208f92c4d8457374ff507996d58ffa5586d1ecd5Mitchell WillsLOCAL_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-function \ 48208f92c4d8457374ff507996d58ffa5586d1ecd5Mitchell Wills -Wunused-variable -Winit-self -Wwrite-strings -Wshadow 49ec61e7731968be994a23f2bd138f6761c8aea498xinhe 50ec61e7731968be994a23f2bd138f6761c8aea498xinheLOCAL_C_INCLUDES += \ 51ec61e7731968be994a23f2bd138f6761c8aea498xinhe $(LOCAL_PATH)/jni \ 52ec61e7731968be994a23f2bd138f6761c8aea498xinhe external/libnl-headers \ 53ec61e7731968be994a23f2bd138f6761c8aea498xinhe $(call include-path-for, libhardware_legacy)/hardware_legacy 54ec61e7731968be994a23f2bd138f6761c8aea498xinhe 55ec61e7731968be994a23f2bd138f6761c8aea498xinheLOCAL_SRC_FILES := \ 56ec61e7731968be994a23f2bd138f6761c8aea498xinhe lib/wifi_hal_stub.cpp 57ec61e7731968be994a23f2bd138f6761c8aea498xinhe 58ec61e7731968be994a23f2bd138f6761c8aea498xinheLOCAL_MODULE := libwifi-hal-stub 59ec61e7731968be994a23f2bd138f6761c8aea498xinhe 60ec61e7731968be994a23f2bd138f6761c8aea498xinheinclude $(BUILD_STATIC_LIBRARY) 61ec61e7731968be994a23f2bd138f6761c8aea498xinhe 6213cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde# set correct hal library path 6313cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde# ============================================================ 6413cf25e15cbe308541ff84fce89b0f506cd71138Vinit DeshapndeLIB_WIFI_HAL := libwifi-hal 6513cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde 6613cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapndeifeq ($(BOARD_WLAN_DEVICE), bcmdhd) 6713cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde LIB_WIFI_HAL := libwifi-hal-bcm 6813cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapndeelse ifeq ($(BOARD_WLAN_DEVICE), qcwcn) 692bb7704f291784cc7f3c317a09261357d983cb90Kumar Anand LIB_WIFI_HAL := libwifi-hal-qcom 7013cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapndeelse ifeq ($(BOARD_WLAN_DEVICE), mrvl) 71042c54bfd5144ce8e720585b2093796e7e28de5eVinit Deshpande # this is commented because none of the nexus devices 72042c54bfd5144ce8e720585b2093796e7e28de5eVinit Deshpande # that sport Marvell's wifi have support for HAL 73042c54bfd5144ce8e720585b2093796e7e28de5eVinit Deshpande # LIB_WIFI_HAL := libwifi-hal-mrvl 7456b11b4376e0921b6d7db52f738d8360607635b9sample.linelse ifeq ($(BOARD_WLAN_DEVICE), MediaTek) 7556b11b4376e0921b6d7db52f738d8360607635b9sample.lin # support MTK WIFI HAL 7656b11b4376e0921b6d7db52f738d8360607635b9sample.lin LIB_WIFI_HAL := libwifi-hal-mt66xx 7713cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapndeendif 7813cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde 79766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde# Make the JNI part 807f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde# ============================================================ 817f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapndeinclude $(CLEAR_VARS) 827f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde 830d83625c25353c92c123f552939eea4b33074b60Mitchell WillsLOCAL_REQUIRED_MODULES := libhardware_legacy 847f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde 85208f92c4d8457374ff507996d58ffa5586d1ecd5Mitchell WillsLOCAL_CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-unused-function \ 86208f92c4d8457374ff507996d58ffa5586d1ecd5Mitchell Wills -Wunused-variable -Winit-self -Wwrite-strings -Wshadow 877f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde 887f9a15d554f69311a0db43347d6473a7c4c46e2eVinit DeshapndeLOCAL_C_INCLUDES += \ 89766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde $(JNI_H_INCLUDE) \ 90766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde $(call include-path-for, libhardware)/hardware \ 91766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde $(call include-path-for, libhardware_legacy)/hardware_legacy \ 9213cf25e15cbe308541ff84fce89b0f506cd71138Vinit Deshapnde libcore/include 937f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde 947f9a15d554f69311a0db43347d6473a7c4c46e2eVinit DeshapndeLOCAL_SHARED_LIBRARIES += \ 957f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde libnativehelper \ 967f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde libcutils \ 977f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde libutils \ 987f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde libhardware \ 99766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde libhardware_legacy \ 1002bb7704f291784cc7f3c317a09261357d983cb90Kumar Anand libnl \ 1010d83625c25353c92c123f552939eea4b33074b60Mitchell Wills libdl 102766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde 103ec61e7731968be994a23f2bd138f6761c8aea498xinheLOCAL_STATIC_LIBRARIES += libwifi-hal-stub 10450e20834408a3ee55170f8a34dfaeee26e7403ddVinit DeshapndeLOCAL_STATIC_LIBRARIES += $(LIB_WIFI_HAL) 1057f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde 1067f9a15d554f69311a0db43347d6473a7c4c46e2eVinit DeshapndeLOCAL_SRC_FILES := \ 107766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde jni/com_android_server_wifi_WifiNative.cpp \ 108766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde jni/jni_helper.cpp 1097f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde 110956f54b391677d78379729dd14518edddf3c7660Etan Cohenifdef INCLUDE_NAN_FEATURE 111956f54b391677d78379729dd14518edddf3c7660Etan CohenLOCAL_SRC_FILES += \ 112956f54b391677d78379729dd14518edddf3c7660Etan Cohen jni/com_android_server_wifi_nan_WifiNanNative.cpp 113956f54b391677d78379729dd14518edddf3c7660Etan Cohenendif 114956f54b391677d78379729dd14518edddf3c7660Etan Cohen 115766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit DeshapndeLOCAL_MODULE := libwifi-service 116b0c36a9e49578885ff709f6bde0e2fb83e3d15d7Andreas Gampe# b/22172328 117b0c36a9e49578885ff709f6bde0e2fb83e3d15d7Andreas GampeLOCAL_CLANG := false 1187f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde 119766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapndeinclude $(BUILD_SHARED_LIBRARY) 120766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde 121766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde# Build the java code 122766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde# ============================================================ 123766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde 124766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapndeinclude $(CLEAR_VARS) 125766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde 126766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit DeshapndeLOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/java 127766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit DeshapndeLOCAL_SRC_FILES := $(call all-java-files-under, java) \ 128766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde $(call all-Iaidl-files-under, java) \ 1291b067831bbff14f8e7a99b927b69f714d1b03448Glen Kuhne $(call all-logtags-files-under, java) \ 1301b067831bbff14f8e7a99b927b69f714d1b03448Glen Kuhne $(call all-proto-files-under, proto) 131766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde 132956f54b391677d78379729dd14518edddf3c7660Etan Cohenifndef INCLUDE_NAN_FEATURE 133956f54b391677d78379729dd14518edddf3c7660Etan CohenLOCAL_SRC_FILES := $(filter-out $(call all-java-files-under, \ 134956f54b391677d78379729dd14518edddf3c7660Etan Cohen java/com/android/server/wifi/nan),$(LOCAL_SRC_FILES)) 135956f54b391677d78379729dd14518edddf3c7660Etan Cohenendif 136956f54b391677d78379729dd14518edddf3c7660Etan Cohen 137de3d89a8e438f97f4761613f528b9c53c9458146Yuhao ZhengLOCAL_JAVA_LIBRARIES := bouncycastle conscrypt services 138766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit DeshapndeLOCAL_REQUIRED_MODULES := services 139766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit DeshapndeLOCAL_MODULE_TAGS := 140766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit DeshapndeLOCAL_MODULE := wifi-service 1411b067831bbff14f8e7a99b927b69f714d1b03448Glen KuhneLOCAL_PROTOC_OPTIMIZE_TYPE := nano 142766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapnde 1433d7695c36d4f3b51503f450f5cf639d5ce2750aaAllen Hairifeq ($(EMMA_INSTRUMENT_FRAMEWORK),true) 1443d7695c36d4f3b51503f450f5cf639d5ce2750aaAllen HairLOCAL_EMMA_INSTRUMENT := true 1453d7695c36d4f3b51503f450f5cf639d5ce2750aaAllen Hairendif 1463d7695c36d4f3b51503f450f5cf639d5ce2750aaAllen Hair 147355a0da5d3a63c5928c2c5c15bf6302723bdcfafAllen HairLOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.server.wifi.* 148355a0da5d3a63c5928c2c5c15bf6302723bdcfafAllen Hair 149766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapndeinclude $(BUILD_JAVA_LIBRARY) 1507f9a15d554f69311a0db43347d6473a7c4c46e2eVinit Deshapnde 151766cb4b1fa3b93c146952eacbf6756f67f172ec1Vinit Deshapndeendif 152