1*7eac9e22SMatthias Ringwald# Makefile for libusb based examples 2*7eac9e22SMatthias RingwaldBTSTACK_ROOT = ../.. 3*7eac9e22SMatthias Ringwald 4*7eac9e22SMatthias RingwaldCORE += main.c btstack_stdin_posix.c btstack_tlv_posix.c 5*7eac9e22SMatthias Ringwald 6*7eac9e22SMatthias RingwaldCOMMON += 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*7eac9e22SMatthias RingwaldCOMMON += btstack_audio_portaudio.c btstack_chipset_intel_firmware.c 8*7eac9e22SMatthias Ringwald 9*7eac9e22SMatthias Ringwaldinclude ${BTSTACK_ROOT}/example/Makefile.inc 10*7eac9e22SMatthias Ringwaldinclude ${BTSTACK_ROOT}/chipset/intel/Makefile.inc 11*7eac9e22SMatthias Ringwald 12*7eac9e22SMatthias RingwaldCFLAGS += -g -std=c99 -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wunused-parameter -Wredundant-decls -Wsign-compare 13*7eac9e22SMatthias Ringwald# CFLAGS += -Werror 14*7eac9e22SMatthias Ringwald# CFLAGS += -pedantic 15*7eac9e22SMatthias Ringwald 16*7eac9e22SMatthias Ringwald# only LLVM 17*7eac9e22SMatthias Ringwald# CFLAGS += -Wnewline-eof 18*7eac9e22SMatthias Ringwald# CFLAGS += -Wc11-extensions 19*7eac9e22SMatthias Ringwald# CFLAGS += -Wgnu-empty-initializer 20*7eac9e22SMatthias Ringwald 21*7eac9e22SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/posix \ 22*7eac9e22SMatthias Ringwald -I${BTSTACK_ROOT}/platform/embedded \ 23*7eac9e22SMatthias Ringwald -I${BTSTACK_ROOT}/3rd-party/tinydir \ 24*7eac9e22SMatthias Ringwald -I${BTSTACK_ROOT}/chipset/intel 25*7eac9e22SMatthias Ringwald 26*7eac9e22SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/embedded 27*7eac9e22SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix 28*7eac9e22SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/libusb 29*7eac9e22SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/chipset/csr 30*7eac9e22SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/chipset/intel 31*7eac9e22SMatthias Ringwald 32*7eac9e22SMatthias Ringwald# use pkg-config 33*7eac9e22SMatthias RingwaldCFLAGS += $(shell pkg-config libusb-1.0 --cflags) 34*7eac9e22SMatthias RingwaldLDFLAGS += $(shell pkg-config libusb-1.0 --libs) 35*7eac9e22SMatthias Ringwald 36*7eac9e22SMatthias Ringwald# use pkg-config for portaudio 37*7eac9e22SMatthias Ringwald# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO 38*7eac9e22SMatthias Ringwald# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs) 39*7eac9e22SMatthias Ringwald 40*7eac9e22SMatthias Ringwald# hard coded flags for portaudio in /usr/local/lib 41*7eac9e22SMatthias Ringwald# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO 42*7eac9e22SMatthias Ringwald# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon 43*7eac9e22SMatthias Ringwald 44*7eac9e22SMatthias Ringwaldclean: clean-intel 45*7eac9e22SMatthias Ringwald 46*7eac9e22SMatthias Ringwaldclean_src: 47*7eac9e22SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/src/*.o 48*7eac9e22SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/src/classic/*.o 49*7eac9e22SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/src/ble/*.o 50*7eac9e22SMatthias Ringwald rm -rf * ${BTSTACK_ROOT}/platform/embedded/*.o 51*7eac9e22SMatthias Ringwald 52*7eac9e22SMatthias Ringwaldall: all-intel ${EXAMPLES} 53*7eac9e22SMatthias Ringwald 54