xref: /btstack/port/posix-h4/Makefile (revision f12924e0a61c0582b548a1e70cea1bd59ba21f1d)
1# Makefile for libusb based examples
2BTSTACK_ROOT = ../..
3
4CORE += \
5	bluetooth_init_cc2564B_1.4_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	hci_transport_h4.c \
16	le_device_db_fs.c \
17	main.c \
18	stdin_support.c \
19#	bluetooth_init_cc2564_2.14.c \
20
21# TI-WL183x requires TIInit_11.8.32.c
22
23# examples
24include ${BTSTACK_ROOT}/example/Makefile.inc
25
26# fetch and convert TI init scripts
27include ${BTSTACK_ROOT}/chipset/cc256x/Makefile.inc
28
29# fetch Broadcom init scripts
30include ${BTSTACK_ROOT}/chipset/bcm/Makefile.inc
31
32CFLAGS  += -g -Wall -Werror \
33	-I$(BTSTACK_ROOT)/platform/embedded \
34	-I$(BTSTACK_ROOT)/platform/posix \
35	-I$(BTSTACK_ROOT)/chipset/bcm \
36	-I$(BTSTACK_ROOT)/chipset/cc256x \
37	-I$(BTSTACK_ROOT)/chipset/csr \
38	-I$(BTSTACK_ROOT)/chipset/em9301 \
39	-I$(BTSTACK_ROOT)/chipset/stlc2500d \
40	-I$(BTSTACK_ROOT)/chipset/tc3566x \
41
42VPATH += ${BTSTACK_ROOT}/platform/posix
43VPATH += ${BTSTACK_ROOT}/platform/embedded
44
45VPATH += ${BTSTACK_ROOT}/chipset/bcm
46VPATH += ${BTSTACK_ROOT}/chipset/cc256x
47VPATH += ${BTSTACK_ROOT}/chipset/csr
48VPATH += ${BTSTACK_ROOT}/chipset/em9301
49VPATH += ${BTSTACK_ROOT}/chipset/stlc2500d
50VPATH += ${BTSTACK_ROOT}/chipset/tc3566x
51
52ifeq ($(OS),Windows_NT)
53LDFLAGS += -lws2_32
54endif
55
56# Command Line examples require porting to win32, so only build on other unix-ish hosts
57ifneq ($(OS),Windows_NT)
58EXAMPLES += ${EXAMPLES_CLI}
59endif
60
61# use pkg-config for portaudio
62# CFLAGS  += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
63# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
64# hard coded flags for portaudio in /usr/local/lib
65# CFLAGS  += -I/usr/local/include -DHAVE_PORTAUDIO
66# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
67
68all: BCM43430A1.hcd ${EXAMPLES}
69
70