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),) |
| 18 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 19 | LOCAL_PATH := $(call my-dir) |
| 20 | |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 21 | # |
| 22 | # ANT native library |
| 23 | # |
| 24 | |
| 25 | include $(CLEAR_VARS) |
| 26 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 27 | # For known qualcomm smd devices we remap the chip name to "qualcomm-smd" |
| 28 | |
| 29 | ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"wcn3680") |
| 30 | |
| 31 | BOARD_ANT_WIRELESS_DEVICE := "qualcomm-smd" |
| 32 | |
| 33 | endif |
| 34 | |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 35 | ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"wl12xx") |
| 36 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 37 | ANT_DIR := src/bluez_hci |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 38 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 39 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"bcm433x") |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 40 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 41 | ANT_DIR := src/bluez_hci |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 42 | |
Rohan Martin | 758780f | 2012-12-05 17:31:21 -0700 | [diff] [blame] | 43 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"cg29xx") |
| 44 | |
| 45 | ANT_DIR := src/vfs |
| 46 | |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 47 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"qualcomm-smd") |
| 48 | |
| 49 | ANT_DIR := src/vfs |
| 50 | |
James Bootsma | 9200d29 | 2013-11-25 10:54:02 -0700 | [diff] [blame] | 51 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"qualcomm-uart") |
ANT-Shane | d494ba3 | 2013-11-15 11:19:05 -0700 | [diff] [blame] | 52 | |
| 53 | ANT_DIR := src/bt-vendor_vfs |
| 54 | |
James Bootsma | 9eb78a3 | 2017-06-13 09:42:00 -0600 | [diff] [blame] | 55 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"qualcomm-hidl") |
| 56 | |
| 57 | ANT_DIR := src/qcomm-hidl |
| 58 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 59 | else ifeq ($(BOARD_ANT_WIRELESS_DEVICE),"vfs-prerelease") |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 60 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 61 | ANT_DIR := src/vfs |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 62 | |
| 63 | else |
| 64 | |
| 65 | $(error Unsupported BOARD_ANT_WIRELESS_DEVICE := $(BOARD_ANT_WIRELESS_DEVICE)) |
| 66 | |
| 67 | endif # BOARD_ANT_WIRELESS_DEVICE type |
| 68 | |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 69 | COMMON_DIR := src/common |
| 70 | |
| 71 | include $(LOCAL_PATH)/$(ANT_DIR)/Android.mk |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 72 | |
| 73 | # |
| 74 | # ANT Application |
| 75 | # |
| 76 | |
| 77 | include $(CLEAR_VARS) |
| 78 | |
| 79 | LOCAL_C_INCLUDES:= \ |
| 80 | $(LOCAL_PATH)/src/common/inc \ |
| 81 | $(LOCAL_PATH)/app |
| 82 | |
| 83 | LOCAL_CFLAGS:= -g -c -W -Wall -O2 |
| 84 | |
| 85 | LOCAL_SRC_FILES:= \ |
Rohan Martin | af8cf68 | 2012-11-16 21:11:07 -0700 | [diff] [blame] | 86 | app/ant_app.c |
Rohan Martin | 95c4bdb | 2012-11-01 15:20:17 -0600 | [diff] [blame] | 87 | |
| 88 | LOCAL_SHARED_LIBRARIES := \ |
| 89 | libantradio \ |
| 90 | libcutils |
| 91 | |
| 92 | LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) |
| 93 | LOCAL_MODULE_TAGS := debug |
| 94 | LOCAL_MODULE:=antradio_app |
| 95 | |
| 96 | include $(BUILD_EXECUTABLE) |
| 97 | |
| 98 | |
| 99 | endif # BOARD_ANT_WIRELESS_DEVICE defined |