1# Makefile for libusb based examples 2BTSTACK_ROOT = ../.. 3POSIX_ROOT= ${BTSTACK_ROOT}/platforms/posix 4 5CORE += main.c stdin_support.c 6 7COMMON += hci_transport_h2_libusb.c run_loop_posix.c remote_device_db_fs.c 8 9include ${BTSTACK_ROOT}/example/embedded/Makefile.inc 10 11# CC = gcc-fsf-4.9 12CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror 13# CFLAGS += -Werror 14 15CFLAGS += -I${POSIX_ROOT}/src 16VPATH += ${BTSTACK_ROOT}/platforms/posix/src 17 18ifeq ($(OS),Windows_NT) 19LDFLAGS += -lws2_32 20# assume libusb was installed into /usr/local 21CFLAGS += -I/usr/local/include/libusb-1.0 22LDFLAGS += -L/usr/local/lib -lusb-1.0 23else 24# use pkg-config 25CFLAGS += $(shell pkg-config libusb-1.0 --cflags) 26LDFLAGS += $(shell pkg-config libusb-1.0 --libs) 27endif 28 29all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} 30