xref: /btstack/port/libusb/Makefile (revision d622dcd08a916bbeae590cb4fbecf31c7c9b5c55)
1# Makefile for libusb based examples
2BTSTACK_ROOT = ../..
3
4CORE += main.c btstack_stdin_posix.c btstack_tlv_posix.c
5
6COMMON  += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_fs.c btstack_link_key_db_fs.c wav_util.c btstack_network_posix.c
7
8include ${BTSTACK_ROOT}/example/Makefile.inc
9
10CFLAGS  += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror -Wunused-parameter -Wredundant-decls -Wsign-compare
11# CFLAGS += -Werror
12
13CFLAGS += -I${BTSTACK_ROOT}/platform/posix \
14		  -I${BTSTACK_ROOT}/platform/embedded \
15		  -I${BTSTACK_ROOT}/3rd-party/tinydir
16
17VPATH += ${BTSTACK_ROOT}/platform/embedded
18VPATH += ${BTSTACK_ROOT}/platform/posix
19VPATH += ${BTSTACK_ROOT}/platform/libusb
20
21# use pkg-config
22CFLAGS  += $(shell pkg-config libusb-1.0 --cflags)
23LDFLAGS += $(shell pkg-config libusb-1.0 --libs)
24
25# use pkg-config for portaudio
26# CFLAGS  += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
27# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
28
29# hard coded flags for portaudio in /usr/local/lib
30# CFLAGS  += -I/usr/local/include -DHAVE_PORTAUDIO
31# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
32
33clean_src:
34	rm -rf * ${BTSTACK_ROOT}/src/*.o
35	rm -rf * ${BTSTACK_ROOT}/src/classic/*.o
36	rm -rf * ${BTSTACK_ROOT}/src/ble/*.o
37	rm -rf * ${BTSTACK_ROOT}/platform/embedded/*.o
38
39all: ${EXAMPLES}
40
41