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