xref: /btstack/port/raspi/Makefile (revision f2eb0907497ae6c49729a66e13ab73e9da185656)
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	rijndael.c
21
22# examples
23include ${BTSTACK_ROOT}/example/Makefile.inc
24
25# use (cross)compiler for Raspi
26CC = arm-linux-gnueabihf-gcc
27
28CFLAGS  += -g -Wall -Werror \
29	-I$(BTSTACK_ROOT)/platform/embedded \
30	-I$(BTSTACK_ROOT)/platform/posix \
31	-I$(BTSTACK_ROOT)/chipset/bcm \
32	-I${BTSTACK_ROOT}/3rd-party/tinydir \
33    -I${BTSTACK_ROOT}/3rd-party/rijndael
34
35
36
37# add 'real time' lib for clock_gettime
38LDFLAGS += -lrt
39
40VPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
41VPATH += ${BTSTACK_ROOT}/platform/posix
42VPATH += ${BTSTACK_ROOT}/platform/embedded
43
44VPATH += ${BTSTACK_ROOT}/chipset/bcm
45
46EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
47EXAMPLES += pan_lwip_http_server
48
49# use pkg-config for portaudio
50# CFLAGS  += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
51# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
52# hard coded flags for portaudio in /usr/local/lib
53# CFLAGS  += -I/usr/local/include -DHAVE_PORTAUDIO
54# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
55
56all: ${EXAMPLES}
57