18caefee3SMatthias Ringwald# Makefile for libusb based examples 2f67eb7c2SMatthias RingwaldBTSTACK_ROOT ?= ../.. 38caefee3SMatthias Ringwald 459bdfe96SMatthias RingwaldCORE += main.c btstack_stdin_posix.c btstack_tlv_posix.c 58caefee3SMatthias Ringwald 681862996SMatthias RingwaldCOMMON += 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 77cdc89a5SMatthias RingwaldCOMMON += btstack_audio_portaudio.c btstack_chipset_zephyr.c rijndael.c 88caefee3SMatthias Ringwald 9bcf00d8fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/example/Makefile.inc 108caefee3SMatthias Ringwald 119d30a519SMatthias RingwaldCFLAGS += -g -std=c99 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wunused-parameter -Wredundant-decls -Wsign-compare -Wswitch-default 128caefee3SMatthias Ringwald# CFLAGS += -Werror 133f0fce8cSMatthias Ringwald# CFLAGS += -pedantic 143f0fce8cSMatthias Ringwald 153f0fce8cSMatthias Ringwald# only LLVM 163f0fce8cSMatthias Ringwald# CFLAGS += -Wnewline-eof 173f0fce8cSMatthias Ringwald# CFLAGS += -Wc11-extensions 183f0fce8cSMatthias Ringwald# CFLAGS += -Wgnu-empty-initializer 198caefee3SMatthias Ringwald 20dd9e275cSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/posix \ 21d08566fbSMatthias Ringwald -I${BTSTACK_ROOT}/platform/embedded \ 22f9563b89SMatthias Ringwald -I${BTSTACK_ROOT}/3rd-party/tinydir \ 237cdc89a5SMatthias Ringwald -I${BTSTACK_ROOT}/3rd-party/rijndael \ 24f9563b89SMatthias Ringwald -I${BTSTACK_ROOT}/chipset/zephyr 253edc84c5SMatthias Ringwald 267cdc89a5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/rijndael 273edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/embedded 28dd9e275cSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix 29ff964d8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/libusb 30cd5e24b3SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/chipset/csr 31f9563b89SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/chipset/zephyr 328caefee3SMatthias Ringwald 338caefee3SMatthias Ringwald# use pkg-config 348caefee3SMatthias RingwaldCFLAGS += $(shell pkg-config libusb-1.0 --cflags) 358caefee3SMatthias RingwaldLDFLAGS += $(shell pkg-config libusb-1.0 --libs) 368caefee3SMatthias Ringwald 37bdc352b1SMatthias RingwaldEXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE} 3897dc5e69SMatthias RingwaldEXAMPLES += pan_lwip_http_server 39cd5e24b3SMatthias RingwaldEXAMPLES += csr_set_bd_addr 40cd5e24b3SMatthias Ringwald 41cd5e24b3SMatthias Ringwaldcsr_set_bd_addr: ${CORE_OBJ} ${COMMON_OBJ} btstack_chipset_csr.o csr_set_bd_addr.o 42cd5e24b3SMatthias Ringwald ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 43cd5e24b3SMatthias Ringwald 44185c8cd4SMatthias Ringwald# use pkg-config for portaudio 45*7d94e05fSMatthias Ringwald# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO 46*7d94e05fSMatthias Ringwald# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs) 47185c8cd4SMatthias Ringwald 48037db388SMatthias Ringwaldclean_src: 49037db388SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/src/*.o 50037db388SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/src/classic/*.o 51037db388SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/src/ble/*.o 52037db388SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/platform/embedded/*.o 53037db388SMatthias Ringwald 540e537d1eSMatthias Ringwaldall: ${EXAMPLES} 55037db388SMatthias Ringwald 56