1# Makefile for libusb based examples 2BTSTACK_ROOT = ../.. 3 4CORE += \ 5 bluetooth_init_cc2564B_1.5_BT_Spec_4.1.c \ 6 btstack_chipset_bcm.c \ 7 btstack_chipset_cc256x.c \ 8 btstack_chipset_csr.c \ 9 btstack_chipset_em9301.c \ 10 btstack_chipset_stlc2500d.c \ 11 btstack_chipset_tc3566x.c \ 12 btstack_link_key_db_fs.c \ 13 btstack_run_loop_posix.c \ 14 btstack_uart_block_posix.c \ 15 btstack_slip.c \ 16 hci_transport_h5.c \ 17 le_device_db_fs.c \ 18 main.c \ 19 stdin_support.c \ 20# btstack_chipset_bcm.c \ 21 22# TI-WL183x requires TIInit_11.8.32.c 23 24# examples 25include ${BTSTACK_ROOT}/example/Makefile.inc 26 27# fetch and convert TI init scripts 28include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc 29 30CFLAGS += -g -Wall -Werror \ 31 -I$(BTSTACK_ROOT)/platform/embedded \ 32 -I$(BTSTACK_ROOT)/platform/posix \ 33 -I$(BTSTACK_ROOT)/chipset/bcm \ 34 -I$(BTSTACK_ROOT)/chipset/cc256x \ 35 -I$(BTSTACK_ROOT)/chipset/csr \ 36 -I$(BTSTACK_ROOT)/chipset/em9301 \ 37 -I$(BTSTACK_ROOT)/chipset/stlc2500d \ 38 -I$(BTSTACK_ROOT)/chipset/tc3566x \ 39 40VPATH += ${BTSTACK_ROOT}/platform/posix 41VPATH += ${BTSTACK_ROOT}/platform/embedded 42 43VPATH += ${BTSTACK_ROOT}/chipset/bcm 44VPATH += ${BTSTACK_ROOT}/chipset/cc256x 45VPATH += ${BTSTACK_ROOT}/chipset/csr 46VPATH += ${BTSTACK_ROOT}/chipset/em9301 47VPATH += ${BTSTACK_ROOT}/chipset/stlc2500d 48VPATH += ${BTSTACK_ROOT}/chipset/tc3566x 49 50ifeq ($(OS),Windows_NT) 51LDFLAGS += -lws2_32 52endif 53 54# Command Line examples require porting to win32, so only build on other unix-ish hosts 55ifneq ($(OS),Windows_NT) 56EXAMPLES += ${EXAMPLES_CLI} 57endif 58 59# use pkg-config for portaudio 60# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO 61# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs) 62# hard coded flags for portaudio in /usr/local/lib 63# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO 64# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon 65 66all: ${EXAMPLES} 67