17eac9e22SMatthias Ringwald# Makefile for libusb based examples 2f67eb7c2SMatthias RingwaldBTSTACK_ROOT ?= ../.. 37eac9e22SMatthias Ringwald 47435ec7bSMatthias RingwaldCORE += main.c btstack_stdin_posix.c btstack_tlv_posix.c hci_dump_posix_fs.c 57eac9e22SMatthias 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 7*f11fd9a9SMatthias RingwaldCOMMON += btstack_audio_portaudio.c btstack_chipset_intel_firmware.c rijndael.c btstack_signal.c 87eac9e22SMatthias Ringwald 97eac9e22SMatthias Ringwaldinclude ${BTSTACK_ROOT}/example/Makefile.inc 107eac9e22SMatthias Ringwaldinclude ${BTSTACK_ROOT}/chipset/intel/Makefile.inc 117eac9e22SMatthias Ringwald 127eac9e22SMatthias RingwaldCFLAGS += -g -std=c99 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wunused-parameter -Wredundant-decls -Wsign-compare 137eac9e22SMatthias Ringwald# CFLAGS += -Werror 147eac9e22SMatthias Ringwald# CFLAGS += -pedantic 157eac9e22SMatthias Ringwald 167eac9e22SMatthias Ringwald# only LLVM 177eac9e22SMatthias Ringwald# CFLAGS += -Wnewline-eof 187eac9e22SMatthias Ringwald# CFLAGS += -Wc11-extensions 197eac9e22SMatthias Ringwald# CFLAGS += -Wgnu-empty-initializer 207eac9e22SMatthias Ringwald 217eac9e22SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/posix \ 227eac9e22SMatthias Ringwald -I${BTSTACK_ROOT}/platform/embedded \ 237eac9e22SMatthias Ringwald -I${BTSTACK_ROOT}/3rd-party/tinydir \ 247cdc89a5SMatthias Ringwald -I${BTSTACK_ROOT}/3rd-party/rijndael \ 257eac9e22SMatthias Ringwald -I${BTSTACK_ROOT}/chipset/intel 267eac9e22SMatthias Ringwald 277cdc89a5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/rijndael 287eac9e22SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/embedded 297eac9e22SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix 307eac9e22SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/libusb 317eac9e22SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/chipset/intel 327eac9e22SMatthias Ringwald 337eac9e22SMatthias Ringwald# use pkg-config 347eac9e22SMatthias RingwaldCFLAGS += $(shell pkg-config libusb-1.0 --cflags) 357eac9e22SMatthias RingwaldLDFLAGS += $(shell pkg-config libusb-1.0 --libs) 367eac9e22SMatthias Ringwald 37*f11fd9a9SMatthias Ringwald# add pthread for ctrl-c signal handler 38*f11fd9a9SMatthias RingwaldLDFLAGS += -lpthread 39*f11fd9a9SMatthias Ringwald 40bdc352b1SMatthias RingwaldEXAMPLES = ${EXAMPLES_GENERAL} ${EXAMPLES_CLASSIC_ONLY} ${EXAMPLES_LE_ONLY} ${EXAMPLES_DUAL_MODE} 41db3b626eSMatthias RingwaldEXAMPLES += pan_lwip_http_server 42db3b626eSMatthias Ringwald 437eac9e22SMatthias Ringwald# use pkg-config for portaudio 447eac9e22SMatthias Ringwald# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO 457eac9e22SMatthias Ringwald# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs) 467eac9e22SMatthias Ringwald 477eac9e22SMatthias Ringwald# hard coded flags for portaudio in /usr/local/lib 487eac9e22SMatthias Ringwald# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO 497eac9e22SMatthias Ringwald# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon 507eac9e22SMatthias Ringwald 517eac9e22SMatthias Ringwaldclean: clean-intel 527eac9e22SMatthias Ringwald 537eac9e22SMatthias Ringwaldclean_src: 547eac9e22SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/src/*.o 557eac9e22SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/src/classic/*.o 567eac9e22SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/src/ble/*.o 577eac9e22SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/platform/embedded/*.o 587eac9e22SMatthias Ringwald 597eac9e22SMatthias Ringwaldall: all-intel ${EXAMPLES} 607eac9e22SMatthias Ringwald 61