xref: /btstack/port/raspi/Makefile (revision f11fd9a990fedbf11b7c70e38b9da44019506e13)
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_posix.c \
12	btstack_slip.c \
13	hci_dump_posix_fs.c \
14	hci_transport_h4.c \
15	hci_transport_h5.c \
16	le_device_db_tlv.c \
17	main.c \
18	wav_util.c 					\
19	btstack_stdin_posix.c \
20	btstack_signal.c \
21	raspi_get_model.c \
22	rijndael.c
23
24# examples
25include ${BTSTACK_ROOT}/example/Makefile.inc
26
27# use (cross)compiler for Raspi
28CC = arm-linux-gnueabihf-gcc
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}/3rd-party/tinydir \
35    -I${BTSTACK_ROOT}/3rd-party/rijndael
36
37
38
39# add 'real time' lib for clock_gettime,
40LDFLAGS += -lrt
41
42# add pthread for ctrl-c signal handler
43LDFLAGS += -lpthread
44
45VPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
46VPATH += ${BTSTACK_ROOT}/platform/posix
47VPATH += ${BTSTACK_ROOT}/platform/embedded
48
49VPATH += ${BTSTACK_ROOT}/chipset/bcm
50
51EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
52EXAMPLES += pan_lwip_http_server
53
54# use pkg-config for portaudio
55# CFLAGS  += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
56# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
57# hard coded flags for portaudio in /usr/local/lib
58# CFLAGS  += -I/usr/local/include -DHAVE_PORTAUDIO
59# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
60
61all: ${EXAMPLES}
62