2015-06-12 20:28:20 +00:00
|
|
|
# Makefile for libusb based PTS tests
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
POSIX_ROOT= ${BTSTACK_ROOT}/platforms/posix
|
|
|
|
|
|
|
|
CORE += main.c stdin_support.c
|
|
|
|
|
|
|
|
COMMON += hci_transport_h2_libusb.c run_loop_posix.c remote_device_db_fs.c
|
|
|
|
|
|
|
|
|
|
|
|
include ${BTSTACK_ROOT}/example/embedded/Makefile.inc
|
|
|
|
|
|
|
|
CFLAGS += -I${POSIX_ROOT}/src -I${BTSTACK_ROOT}/platforms/libusb
|
2015-11-11 11:11:08 +00:00
|
|
|
CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow
|
|
|
|
CFLAGS += -Werror
|
2015-06-12 20:28:20 +00:00
|
|
|
|
|
|
|
VPATH += ${BTSTACK_ROOT}/platforms/posix/src
|
|
|
|
VPATH += ${BTSTACK_ROOT}/platforms/libusb
|
|
|
|
|
2015-11-11 11:11:08 +00:00
|
|
|
# use pkg-config for libusb
|
2015-08-13 18:55:21 +00:00
|
|
|
CFLAGS += $(shell pkg-config libusb-1.0 --cflags)
|
|
|
|
LDFLAGS += $(shell pkg-config libusb-1.0 --libs)
|
2015-08-02 11:49:41 +00:00
|
|
|
# hard coded flags for libusb in /usr/local/lib
|
2015-08-13 18:55:21 +00:00
|
|
|
# CFLAGS += -I/usr/local/include
|
|
|
|
# LDFLAGS += -L/usr/local/lib -lusb-1.0
|
2015-06-12 20:28:20 +00:00
|
|
|
|
2015-11-11 11:11:08 +00:00
|
|
|
# use pkg-config for portaudio
|
|
|
|
CFLAGS += $(shell pkg-config portaudio-2.0 --cflags)
|
|
|
|
LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
|
|
|
|
# hard coded flags for portaudio in /usr/local/lib
|
|
|
|
# CFLAGS += -I/usr/local/include
|
|
|
|
# LDFLAGS += -L/sw/lib -lportaudio -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,Carbon
|
|
|
|
|
2015-07-10 09:56:39 +00:00
|
|
|
EXAMPLES = hfp_hf_test hfp_ag_test ble_peripheral_test ble_central_test l2cap_test classic_test bnep_test hsp_ag_test hsp_hs_test
|
2015-06-12 20:28:20 +00:00
|
|
|
|
2015-10-15 14:33:34 +00:00
|
|
|
all: ${BTSTACK_ROOT}/src/version.h ${EXAMPLES}
|
2015-06-12 20:28:20 +00:00
|
|
|
|
2015-11-01 09:02:01 +00:00
|
|
|
# compile .gatt descriptions
|
|
|
|
ble_peripheral_test.h: ble_peripheral_test.gatt
|
|
|
|
python ${BTSTACK_ROOT}/ble/compile-gatt.py $< $@
|
|
|
|
ble_central_test.h: ble_central_test.gatt
|
|
|
|
python ${BTSTACK_ROOT}/ble/compile-gatt.py $< $@
|
|
|
|
|
|
|
|
ble_peripheral_test: ble_peripheral_test.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_REAL_OBJ} ble_peripheral_test.o
|
|
|
|
${CC} $(filter-out ble_peripheral_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
|
|
|
ble_central_test: ble_central_test.h ${CORE_OBJ} ${COMMON_OBJ} ${SM_REAL_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ad_parser.o ble_central_test.c
|
|
|
|
${CC} $(filter-out ble_central_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
2015-06-12 20:28:20 +00:00
|
|
|
|
|
|
|
hsp_ag_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_ag.o hsp_ag_test.c
|
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
|
|
|
hsp_hs_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hsp_hs.o hsp_hs_test.c
|
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2015-07-09 13:28:06 +00:00
|
|
|
hfp_hf_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hfp.o hfp_hf.o hfp_hf_test.c
|
2015-07-08 15:15:50 +00:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2015-07-09 13:28:06 +00:00
|
|
|
hfp_ag_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} hfp.o hfp_ag.o hfp_ag_test.c
|
2015-07-08 15:15:50 +00:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2015-06-12 20:28:20 +00:00
|
|
|
l2cap_test: ${CORE_OBJ} ${COMMON_OBJ} l2cap_test.c
|
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
|
|
|
classic_test: ${CORE_OBJ} ${COMMON_OBJ} ${SDP_CLIENT} classic_test.c
|
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2015-07-16 12:09:50 +00:00
|
|
|
bnep_test: ${CORE_OBJ} ${COMMON_OBJ} pan.o bnep_test.c
|
2015-06-12 20:28:20 +00:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|