Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2009 Dynastream Innovations |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | ifneq ($(BOARD_ANT_WIRELESS_DEVICE),) |
Bootsma, James | 795d048 | 2020-01-20 17:49:04 -0700 | [diff] [blame] | 18 | ifneq ($(BOARD_ANT_WIRELESS_DEVICE),"qualcomm-hidl") |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 19 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 20 | LOCAL_PATH := $(call my-dir) |
| 21 | |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 22 | # |
| 23 | # ANT native library |
| 24 | # |
| 25 | |
| 26 | include $(CLEAR_VARS) |
| 27 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 28 | # For known qualcomm smd devices we remap the chip name to "qualcomm-smd" |
| 29 | |
| 30 | ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"wcn3680") |
| 31 | |
| 32 | BOARD_ANT_WIRELESS_DEVICE := "qualcomm-smd" |
| 33 | |
| 34 | endif |
| 35 | |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 36 | ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"wl12xx") |
| 37 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 38 | ANT_DIR := src/bluez_hci |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 39 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 40 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"bcm433x") |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 41 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 42 | ANT_DIR := src/bluez_hci |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 43 | |
Rohan Martin | 758780f | 2012-12-05 17:31:21 -0700 | [diff] [blame] | 44 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"cg29xx") |
| 45 | |
| 46 | ANT_DIR := src/vfs |
| 47 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 48 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"qualcomm-smd") |
| 49 | |
| 50 | ANT_DIR := src/vfs |
| 51 | |
James Bootsma | 9200d29 | 2013-11-25 10:54:02 -0700 | [diff] [blame] | 52 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"qualcomm-uart") |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 53 | |
| 54 | ANT_DIR := src/bt-vendor_vfs |
| 55 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 56 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"vfs-prerelease") |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 57 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 58 | ANT_DIR := src/vfs |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 59 | |
| 60 | else |
| 61 | |
| 62 | $(error Unsupported BOARD_ANT_WIRELESS_DEVICE := $(BOARD_ANT_WIRELESS_DEVICE)) |
| 63 | |
| 64 | endif # BOARD_ANT_WIRELESS_DEVICE type |
| 65 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 66 | COMMON_DIR := src/common |
| 67 | |
| 68 | include $(LOCAL_PATH)/$(ANT_DIR)/Android.mk |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 69 | |
| 70 | # |
| 71 | # ANT Application |
| 72 | # |
| 73 | |
| 74 | include $(CLEAR_VARS) |
| 75 | |
| 76 | LOCAL_C_INCLUDES:= \ |
| 77 | $(LOCAL_PATH)/src/common/inc \ |
| 78 | $(LOCAL_PATH)/app |
| 79 | |
Divya Sharma | b9e23a5 | 2017-01-12 20:38:52 -0800 | [diff] [blame] | 80 | LOCAL_C_INCLUDES += frameworks/base/core/jni/include |
| 81 | |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 82 | LOCAL_CFLAGS:= -g -c -W -Wall -O2 |
| 83 | |
| 84 | LOCAL_SRC_FILES:= \ |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 85 | app/ant_app.c |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 86 | |
| 87 | LOCAL_SHARED_LIBRARIES := \ |
| 88 | libantradio \ |
| 89 | libcutils |
| 90 | |
| 91 | LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 92 | LOCAL_MODULE:=antradio_app |
| 93 | |
Bootsma, James | 1e9946b | 2020-01-16 13:55:12 -0700 | [diff] [blame] | 94 | LOCAL_SYSTEM_EXT_MODULE := true |
| 95 | |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 96 | include $(BUILD_EXECUTABLE) |
| 97 | |
Bootsma, James | 795d048 | 2020-01-20 17:49:04 -0700 | [diff] [blame] | 98 | endif |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 99 | endif # BOARD_ANT_WIRELESS_DEVICE defined |