xref: /btstack/port/raspi/Makefile (revision f11fd9a990fedbf11b7c70e38b9da44019506e13)
1f5c04f62SMatthias Ringwald# Makefile for Raspberry Pi
2f67eb7c2SMatthias RingwaldBTSTACK_ROOT ?= ../..
3f5c04f62SMatthias Ringwald
4f5c04f62SMatthias RingwaldCORE += \
5f5c04f62SMatthias Ringwald	btstack_chipset_bcm.c \
6f5c04f62SMatthias Ringwald	btstack_chipset_bcm_download_firmware.c \
711e995b1SMatthias Ringwald	btstack_control_raspi.c \
86cdc9c42SMatthias Ringwald	btstack_link_key_db_tlv.c \
9f5c04f62SMatthias Ringwald	btstack_run_loop_posix.c \
1072f99eadSMatthias Ringwald	btstack_tlv_posix.c \
1179530e37SMatthias Ringwald	btstack_uart_posix.c \
12f5c04f62SMatthias Ringwald	btstack_slip.c \
137435ec7bSMatthias Ringwald	hci_dump_posix_fs.c \
146e4c47b0SMatthias Ringwald	hci_transport_h4.c \
15f5c04f62SMatthias Ringwald	hci_transport_h5.c \
168c8a87eeSMatthias Ringwald	le_device_db_tlv.c \
17f5c04f62SMatthias Ringwald	main.c \
18f5c04f62SMatthias Ringwald	wav_util.c 					\
19f5c04f62SMatthias Ringwald	btstack_stdin_posix.c \
20*f11fd9a9SMatthias Ringwald	btstack_signal.c \
21a5ceff15SMatthias Ringwald	raspi_get_model.c \
22a5ceff15SMatthias Ringwald	rijndael.c
23f5c04f62SMatthias Ringwald
24f5c04f62SMatthias Ringwald# examples
25f5c04f62SMatthias Ringwaldinclude ${BTSTACK_ROOT}/example/Makefile.inc
26f5c04f62SMatthias Ringwald
27f5c04f62SMatthias Ringwald# use (cross)compiler for Raspi
28f5c04f62SMatthias RingwaldCC = arm-linux-gnueabihf-gcc
29f5c04f62SMatthias Ringwald
30f5c04f62SMatthias RingwaldCFLAGS  += -g -Wall -Werror \
31f5c04f62SMatthias Ringwald	-I$(BTSTACK_ROOT)/platform/embedded \
32f5c04f62SMatthias Ringwald	-I$(BTSTACK_ROOT)/platform/posix \
33f5c04f62SMatthias Ringwald	-I$(BTSTACK_ROOT)/chipset/bcm \
34a5ceff15SMatthias Ringwald	-I${BTSTACK_ROOT}/3rd-party/tinydir \
35a5ceff15SMatthias Ringwald    -I${BTSTACK_ROOT}/3rd-party/rijndael
36a5ceff15SMatthias Ringwald
37a5ceff15SMatthias Ringwald
38f5c04f62SMatthias Ringwald
39*f11fd9a9SMatthias Ringwald# add 'real time' lib for clock_gettime,
406c81f8f2SMatthias RingwaldLDFLAGS += -lrt
416c81f8f2SMatthias Ringwald
42*f11fd9a9SMatthias Ringwald# add pthread for ctrl-c signal handler
43*f11fd9a9SMatthias RingwaldLDFLAGS += -lpthread
44*f11fd9a9SMatthias Ringwald
45a5ceff15SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
46f5c04f62SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix
47f5c04f62SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/embedded
48f5c04f62SMatthias Ringwald
49f5c04f62SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/chipset/bcm
50f5c04f62SMatthias Ringwald
51bdc352b1SMatthias RingwaldEXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
52db3b626eSMatthias RingwaldEXAMPLES += pan_lwip_http_server
53db3b626eSMatthias Ringwald
54f5c04f62SMatthias Ringwald# use pkg-config for portaudio
55f5c04f62SMatthias Ringwald# CFLAGS  += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
56f5c04f62SMatthias Ringwald# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
57f5c04f62SMatthias Ringwald# hard coded flags for portaudio in /usr/local/lib
58f5c04f62SMatthias Ringwald# CFLAGS  += -I/usr/local/include -DHAVE_PORTAUDIO
59f5c04f62SMatthias Ringwald# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
60f5c04f62SMatthias Ringwald
61f5c04f62SMatthias Ringwaldall: ${EXAMPLES}
62