2015-06-12 20:28:20 +00:00
|
|
|
# Makefile for libusb based PTS tests
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
|
|
|
|
CORE += main.c stdin_support.c
|
|
|
|
|
2016-06-27 13:20:16 +00:00
|
|
|
COMMON += hci_transport_h2_libusb.c btstack_run_loop_posix.c btstack_link_key_db_fs.c le_device_db_fs.c
|
2015-06-12 20:28:20 +00:00
|
|
|
|
2016-02-19 08:46:37 +00:00
|
|
|
include ${BTSTACK_ROOT}/example/Makefile.inc
|
2015-06-12 20:28:20 +00:00
|
|
|
|
2015-11-13 14:04:41 +00:00
|
|
|
CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror \
|
2016-01-20 13:20:47 +00:00
|
|
|
-I${BTSTACK_ROOT}/platform/posix \
|
2015-11-14 22:27:21 +00:00
|
|
|
-I${BTSTACK_ROOT}/platform/embedded \
|
2016-10-14 13:31:14 +00:00
|
|
|
-I${BTSTACK_ROOT}/port/libusb \
|
2016-10-14 14:00:59 +00:00
|
|
|
-D ENABLE_LE_DATA_CHANNELS
|
2015-06-12 20:28:20 +00:00
|
|
|
|
2016-01-20 13:20:47 +00:00
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix
|
2015-11-13 14:04:41 +00:00
|
|
|
VPATH += ${BTSTACK_ROOT}/port/libusb
|
2015-06-12 20:28:20 +00:00
|
|
|
|
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
|
2015-11-13 16:12:39 +00:00
|
|
|
# CFLAGS += $(shell pkg-config portaudio-2.0 --cflags)
|
|
|
|
# LDFLAGS += $(shell pkg-config portaudio-2.0 --libs)
|
2015-11-11 11:11:08 +00:00
|
|
|
# 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
|
|
|
|
|
2016-10-04 09:46:19 +00:00
|
|
|
EXAMPLES = iopt ble_peripheral_test ble_central_test l2cap_test classic_test bnep_test hsp_ag_test hsp_hs_test sco_loopback le_data_channel
|
2016-10-06 14:09:54 +00:00
|
|
|
EXAMPLES = le_data_channel
|
2015-06-12 20:28:20 +00:00
|
|
|
|
2016-01-31 19:31:52 +00:00
|
|
|
all: ${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
|
2016-04-10 19:58:19 +00:00
|
|
|
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
|
2015-11-01 09:02:01 +00:00
|
|
|
ble_central_test.h: ble_central_test.gatt
|
2016-04-10 19:58:19 +00:00
|
|
|
python ${BTSTACK_ROOT}/tool/compile_gatt.py $< $@
|
2015-11-01 09:02:01 +00:00
|
|
|
|
2016-10-26 10:53:21 +00:00
|
|
|
ble_peripheral_test: ble_peripheral_test.h ${CORE_OBJ} ${COMMON_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${SM_OBJ} ble_peripheral_test.o
|
2015-11-01 09:02:01 +00:00
|
|
|
${CC} $(filter-out ble_peripheral_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2016-10-26 10:53:21 +00:00
|
|
|
ble_central_test: ble_central_test.h ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} ${ATT_OBJ} ${GATT_SERVER_OBJ} ${GATT_CLIENT_OBJ} ad_parser.o ble_central_test.c
|
2015-11-01 09:02:01 +00:00
|
|
|
${CC} $(filter-out ble_central_test.h,$^) ${CFLAGS} ${LDFLAGS} -o $@
|
2015-06-12 20:28:20 +00:00
|
|
|
|
2016-10-26 10:53:21 +00:00
|
|
|
le_data_channel: ${CORE_OBJ} ${COMMON_OBJ} ${SM_OBJ} ${ATT_OBJ} ad_parser.o le_data_channel.c
|
2016-07-08 14:48:52 +00:00
|
|
|
${CC} $^ ${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 $@
|
|
|
|
|
|
|
|
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 $@
|
2015-11-12 11:22:50 +00:00
|
|
|
|
|
|
|
sco_loopback: ${CORE_OBJ} ${COMMON_OBJ} sco_loopback.c
|
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
2015-11-25 15:01:35 +00:00
|
|
|
|
2016-02-04 15:17:04 +00:00
|
|
|
iopt: ${CORE_OBJ} ${COMMON_OBJ} pan.o hsp_ag.o hsp_hs.o hfp_ag.o hfp_hf.o hfp_gsm_model.o iopt.c hfp.o ${SDP_CLIENT}
|
2015-11-25 15:01:35 +00:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|