xref: /btstack/port/raspi/Makefile (revision 0561b2d8d5dba972c7daa57d5e677f7a1327edfd)
1# Makefile for Raspberry Pi
2BTSTACK_ROOT ?= ../..
3
4CORE += \
5	btstack_chipset_bcm.c \
6	btstack_chipset_bcm_download_firmware.c \
7	btstack_control_raspi.c \
8	btstack_link_key_db_tlv.c \
9	btstack_run_loop_posix.c \
10	btstack_tlv_posix.c \
11	btstack_uart_block_posix.c \
12	btstack_slip.c \
13	hci_transport_h4.c \
14	hci_transport_h5.c \
15	le_device_db_tlv.c \
16	main.c \
17	wav_util.c 					\
18	btstack_stdin_posix.c \
19	raspi_get_model.c
20
21# examples
22include ${BTSTACK_ROOT}/example/Makefile.inc
23
24# use (cross)compiler for Raspi
25CC = arm-linux-gnueabihf-gcc
26
27CFLAGS  += -g -Wall -Werror \
28	-I$(BTSTACK_ROOT)/platform/embedded \
29	-I$(BTSTACK_ROOT)/platform/posix \
30	-I$(BTSTACK_ROOT)/chipset/bcm \
31	-I${BTSTACK_ROOT}/3rd-party/tinydir
32
33# add 'real time' lib for clock_gettime
34LDFLAGS += -lrt
35
36VPATH += ${BTSTACK_ROOT}/platform/posix
37VPATH += ${BTSTACK_ROOT}/platform/embedded
38
39VPATH += ${BTSTACK_ROOT}/chipset/bcm
40
41EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
42EXAMPLES += pan_lwip_http_server
43
44# use pkg-config for portaudio
45# CFLAGS  += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
46# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
47# hard coded flags for portaudio in /usr/local/lib
48# CFLAGS  += -I/usr/local/include -DHAVE_PORTAUDIO
49# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
50
51all: ${EXAMPLES}
52