xref: /btstack/port/libusb-intel/Makefile (revision 0561b2d8d5dba972c7daa57d5e677f7a1327edfd)
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_tlv.c btstack_link_key_db_tlv.c wav_util.c btstack_network_posix.c
7COMMON += btstack_audio_portaudio.c btstack_chipset_intel_firmware.c
8
9include ${BTSTACK_ROOT}/example/Makefile.inc
10include ${BTSTACK_ROOT}/chipset/intel/Makefile.inc
11
12CFLAGS  += -g -std=c99 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wunused-parameter -Wredundant-decls -Wsign-compare
13# CFLAGS += -Werror
14# CFLAGS += -pedantic
15
16# only LLVM
17# CFLAGS += -Wnewline-eof
18# CFLAGS += -Wc11-extensions
19# CFLAGS += -Wgnu-empty-initializer
20
21CFLAGS += -I${BTSTACK_ROOT}/platform/posix \
22		  -I${BTSTACK_ROOT}/platform/embedded \
23		  -I${BTSTACK_ROOT}/3rd-party/tinydir \
24		  -I${BTSTACK_ROOT}/chipset/intel
25
26VPATH += ${BTSTACK_ROOT}/platform/embedded
27VPATH += ${BTSTACK_ROOT}/platform/posix
28VPATH += ${BTSTACK_ROOT}/platform/libusb
29VPATH += ${BTSTACK_ROOT}/chipset/csr
30VPATH += ${BTSTACK_ROOT}/chipset/intel
31
32# use pkg-config
33CFLAGS  += $(shell pkg-config libusb-1.0 --cflags)
34LDFLAGS += $(shell pkg-config libusb-1.0 --libs)
35
36EXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE}
37EXAMPLES += pan_lwip_http_server
38
39# use pkg-config for portaudio
40# CFLAGS  += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO
41# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
42
43# hard coded flags for portaudio in /usr/local/lib
44# CFLAGS  += -I/usr/local/include -DHAVE_PORTAUDIO
45# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
46
47clean: clean-intel
48
49clean_src:
50	rm -rf * ${BTSTACK_ROOT}/src/*.o
51	rm -rf * ${BTSTACK_ROOT}/src/classic/*.o
52	rm -rf * ${BTSTACK_ROOT}/src/ble/*.o
53	rm -rf * ${BTSTACK_ROOT}/platform/embedded/*.o
54
55all: all-intel ${EXAMPLES}
56
57