18caefee3SMatthias Ringwald# Makefile for libusb based examples 28caefee3SMatthias RingwaldBTSTACK_ROOT = ../.. 38caefee3SMatthias Ringwald 4*7ea7688aSMatthias RingwaldCORE += main.c btstack_stdin_posix.c 58caefee3SMatthias Ringwald 6049f64bbSMatthias RingwaldCOMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c le_device_db_fs.c btstack_link_key_db_fs.c 78caefee3SMatthias Ringwald 8bcf00d8fSMatthias Ringwaldinclude ${BTSTACK_ROOT}/example/Makefile.inc 98caefee3SMatthias Ringwald 108caefee3SMatthias Ringwald# CC = gcc-fsf-4.9 119ec2630cSMatthias RingwaldCFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror -Wunused-parameter 128caefee3SMatthias Ringwald# CFLAGS += -Werror 138caefee3SMatthias Ringwald 14dd9e275cSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/posix \ 153edc84c5SMatthias Ringwald -I${BTSTACK_ROOT}/platform/embedded 163edc84c5SMatthias Ringwald 173edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/embedded 18dd9e275cSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix 19ff964d8eSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/libusb 208caefee3SMatthias Ringwald 218caefee3SMatthias Ringwaldifeq ($(OS),Windows_NT) 228caefee3SMatthias RingwaldLDFLAGS += -lws2_32 238caefee3SMatthias Ringwald# assume libusb was installed into /usr/local 248caefee3SMatthias RingwaldCFLAGS += -I/usr/local/include/libusb-1.0 258caefee3SMatthias RingwaldLDFLAGS += -L/usr/local/lib -lusb-1.0 268caefee3SMatthias Ringwaldelse 278caefee3SMatthias Ringwald# use pkg-config 288caefee3SMatthias RingwaldCFLAGS += $(shell pkg-config libusb-1.0 --cflags) 298caefee3SMatthias RingwaldLDFLAGS += $(shell pkg-config libusb-1.0 --libs) 308caefee3SMatthias Ringwaldendif 318caefee3SMatthias Ringwald 32185c8cd4SMatthias Ringwald# use pkg-config for portaudio 33b720584cSMatthias Ringwald# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags) -DHAVE_PORTAUDIO 34b720584cSMatthias Ringwald# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs) 35185c8cd4SMatthias Ringwald# hard coded flags for portaudio in /usr/local/lib 36185c8cd4SMatthias Ringwald# CFLAGS += -I/usr/local/include -DHAVE_PORTAUDIO 37185c8cd4SMatthias Ringwald# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon 38185c8cd4SMatthias Ringwald 390e537d1eSMatthias Ringwaldall: ${EXAMPLES} 40