18caefee3SMatthias Ringwald# Makefile for libusb based examples 28caefee3SMatthias RingwaldBTSTACK_ROOT = ../.. 38caefee3SMatthias Ringwald 48caefee3SMatthias RingwaldCORE += main.c stdin_support.c 58caefee3SMatthias Ringwald 68caefee3SMatthias RingwaldCOMMON += hci_transport_h2_libusb.c run_loop_posix.c remote_device_db_fs.c 78caefee3SMatthias Ringwald 88caefee3SMatthias Ringwaldinclude ${BTSTACK_ROOT}/example/embedded/Makefile.inc 98caefee3SMatthias Ringwald 108caefee3SMatthias Ringwald# CC = gcc-fsf-4.9 118caefee3SMatthias RingwaldCFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror 128caefee3SMatthias Ringwald# CFLAGS += -Werror 138caefee3SMatthias Ringwald 14*dd9e275cSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/posix \ 153edc84c5SMatthias Ringwald -I${BTSTACK_ROOT}/platform/embedded 163edc84c5SMatthias Ringwald 173edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/embedded 18*dd9e275cSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix 198caefee3SMatthias Ringwald 208caefee3SMatthias Ringwaldifeq ($(OS),Windows_NT) 218caefee3SMatthias RingwaldLDFLAGS += -lws2_32 228caefee3SMatthias Ringwald# assume libusb was installed into /usr/local 238caefee3SMatthias RingwaldCFLAGS += -I/usr/local/include/libusb-1.0 248caefee3SMatthias RingwaldLDFLAGS += -L/usr/local/lib -lusb-1.0 258caefee3SMatthias Ringwaldelse 268caefee3SMatthias Ringwald# use pkg-config 278caefee3SMatthias RingwaldCFLAGS += $(shell pkg-config libusb-1.0 --cflags) 288caefee3SMatthias RingwaldLDFLAGS += $(shell pkg-config libusb-1.0 --libs) 298caefee3SMatthias Ringwaldendif 308caefee3SMatthias Ringwald 318caefee3SMatthias Ringwaldall: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} 32