18caefee3SMatthias Ringwald# Makefile for libusb based examples 28caefee3SMatthias RingwaldBTSTACK_ROOT = ../.. 3*3edc84c5SMatthias RingwaldPOSIX_ROOT= ${BTSTACK_ROOT}/platform/posix 48caefee3SMatthias Ringwald 58caefee3SMatthias RingwaldCORE += main.c stdin_support.c 68caefee3SMatthias Ringwald 78caefee3SMatthias RingwaldCOMMON += hci_transport_h2_libusb.c run_loop_posix.c remote_device_db_fs.c 88caefee3SMatthias Ringwald 98caefee3SMatthias Ringwaldinclude ${BTSTACK_ROOT}/example/embedded/Makefile.inc 108caefee3SMatthias Ringwald 118caefee3SMatthias Ringwald# CC = gcc-fsf-4.9 128caefee3SMatthias RingwaldCFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror 138caefee3SMatthias Ringwald# CFLAGS += -Werror 148caefee3SMatthias Ringwald 15*3edc84c5SMatthias RingwaldCFLAGS += -I${POSIX_ROOT}/src \ 16*3edc84c5SMatthias Ringwald -I${BTSTACK_ROOT}/platform/embedded 17*3edc84c5SMatthias Ringwald 18*3edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/embedded 19*3edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix/src 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 328caefee3SMatthias Ringwaldall: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} 33