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