xref: /btstack/port/libusb/Makefile (revision 8caefee39d444df6d8908a96a844825f10fbdaa4)
1*8caefee3SMatthias Ringwald# Makefile for libusb based examples
2*8caefee3SMatthias RingwaldBTSTACK_ROOT = ../..
3*8caefee3SMatthias RingwaldPOSIX_ROOT= ${BTSTACK_ROOT}/platforms/posix
4*8caefee3SMatthias Ringwald
5*8caefee3SMatthias RingwaldCORE += main.c stdin_support.c
6*8caefee3SMatthias Ringwald
7*8caefee3SMatthias RingwaldCOMMON += hci_transport_h2_libusb.c run_loop_posix.c remote_device_db_fs.c
8*8caefee3SMatthias Ringwald
9*8caefee3SMatthias Ringwaldinclude ${BTSTACK_ROOT}/example/embedded/Makefile.inc
10*8caefee3SMatthias Ringwald
11*8caefee3SMatthias Ringwald# CC = gcc-fsf-4.9
12*8caefee3SMatthias RingwaldCFLAGS  += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror
13*8caefee3SMatthias Ringwald# CFLAGS += -Werror
14*8caefee3SMatthias Ringwald
15*8caefee3SMatthias RingwaldCFLAGS += -I${POSIX_ROOT}/src
16*8caefee3SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platforms/posix/src
17*8caefee3SMatthias Ringwald
18*8caefee3SMatthias Ringwaldifeq ($(OS),Windows_NT)
19*8caefee3SMatthias RingwaldLDFLAGS += -lws2_32
20*8caefee3SMatthias Ringwald# assume libusb was installed into /usr/local
21*8caefee3SMatthias RingwaldCFLAGS  += -I/usr/local/include/libusb-1.0
22*8caefee3SMatthias RingwaldLDFLAGS += -L/usr/local/lib -lusb-1.0
23*8caefee3SMatthias Ringwaldelse
24*8caefee3SMatthias Ringwald# use pkg-config
25*8caefee3SMatthias RingwaldCFLAGS  += $(shell pkg-config libusb-1.0 --cflags)
26*8caefee3SMatthias RingwaldLDFLAGS += $(shell pkg-config libusb-1.0 --libs)
27*8caefee3SMatthias Ringwaldendif
28*8caefee3SMatthias Ringwald
29*8caefee3SMatthias Ringwaldall: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES}
30