1# Makefile for libusb based examples 2BTSTACK_ROOT = ../.. 3POSIX_ROOT= ${BTSTACK_ROOT}/platform/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 \ 16 -I${BTSTACK_ROOT}/platform/embedded 17 18VPATH += ${BTSTACK_ROOT}/platform/embedded 19VPATH += ${BTSTACK_ROOT}/platform/posix/src 20 21ifeq ($(OS),Windows_NT) 22LDFLAGS += -lws2_32 23# assume libusb was installed into /usr/local 24CFLAGS += -I/usr/local/include/libusb-1.0 25LDFLAGS += -L/usr/local/lib -lusb-1.0 26else 27# use pkg-config 28CFLAGS += $(shell pkg-config libusb-1.0 --cflags) 29LDFLAGS += $(shell pkg-config libusb-1.0 --libs) 30endif 31 32all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES} 33