2015-08-07 21:45:00 +02:00
|
|
|
CC=g++
|
|
|
|
|
|
|
|
# Makefile for libusb based PTS tests
|
|
|
|
BTSTACK_ROOT = ../..
|
2015-11-13 15:04:41 +01:00
|
|
|
POSIX_ROOT= ${BTSTACK_ROOT}/platform/posix
|
2015-08-07 21:45:00 +02:00
|
|
|
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
|
|
|
|
|
2016-02-19 09:46:37 +01:00
|
|
|
include ${BTSTACK_ROOT}/example/Makefile.inc
|
2015-12-02 10:51:57 +01:00
|
|
|
|
2015-08-07 21:45:00 +02:00
|
|
|
COMMON = \
|
2017-05-17 23:22:05 +02:00
|
|
|
ad_parser.c \
|
|
|
|
sdp_server.c \
|
|
|
|
sdp_client_rfcomm.c \
|
2016-02-03 21:55:36 +01:00
|
|
|
btstack_link_key_db_memory.c \
|
2017-05-17 23:22:05 +02:00
|
|
|
btstack_linked_list.c \
|
|
|
|
btstack_memory.c \
|
|
|
|
btstack_memory_pool.c \
|
|
|
|
btstack_run_loop.c \
|
|
|
|
btstack_run_loop_posix.c \
|
|
|
|
btstack_util.c \
|
|
|
|
hci.c \
|
|
|
|
hci_cmd.c \
|
|
|
|
hci_dump.c \
|
|
|
|
l2cap.c \
|
|
|
|
l2cap_signaling.c \
|
|
|
|
rfcomm.c \
|
|
|
|
sdp_client.c \
|
|
|
|
sdp_util.c \
|
2015-08-07 21:45:00 +02:00
|
|
|
|
|
|
|
|
2015-08-26 18:31:31 +02:00
|
|
|
MOCK = \
|
2016-01-06 17:31:20 +01:00
|
|
|
mock.c \
|
|
|
|
test_sequences.c \
|
2016-02-03 21:55:36 +01:00
|
|
|
btstack_link_key_db_memory.c \
|
2016-01-20 16:23:34 +01:00
|
|
|
btstack_linked_list.c \
|
2015-08-26 18:31:31 +02:00
|
|
|
btstack_memory.c \
|
2016-02-03 21:55:36 +01:00
|
|
|
btstack_memory_pool.c \
|
|
|
|
btstack_util.c \
|
2016-01-21 11:33:17 +01:00
|
|
|
hci_cmd.c \
|
2015-08-26 18:31:31 +02:00
|
|
|
hci_dump.c \
|
|
|
|
sdp_util.c \
|
2015-09-23 16:58:34 +02:00
|
|
|
|
2015-08-07 21:45:00 +02:00
|
|
|
COMMON_OBJ = $(COMMON:.c=.o)
|
2015-08-26 18:31:31 +02:00
|
|
|
MOCK_OBJ = $(MOCK:.c=.o)
|
2015-08-07 21:45:00 +02:00
|
|
|
|
|
|
|
# CC = gcc-fsf-4.9
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
2015-11-13 15:04:41 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src/classic
|
2016-01-20 14:20:47 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix
|
2015-08-07 21:45:00 +02:00
|
|
|
|
2018-12-19 19:11:16 +01:00
|
|
|
CFLAGS = -g -Wall -Wmissing-prototypes -Wnarrowing
|
|
|
|
# CFLAGS += -Werror
|
|
|
|
CFLAGS += -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/src/classic -I${POSIX_ROOT} -I${BTSTACK_ROOT}/include
|
2018-12-20 11:49:32 +01:00
|
|
|
# CFLAGS += -D OCTAVE_OUTPUT
|
2020-06-09 17:04:45 +02:00
|
|
|
# CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address
|
2018-12-21 12:12:02 +01:00
|
|
|
LDFLAGS_CPPUTEST += -lCppUTest -lCppUTestExt
|
2015-08-07 21:45:00 +02:00
|
|
|
|
2020-06-09 17:04:45 +02:00
|
|
|
EXAMPLES = hfp_at_parser_test hfp_ag_client_test hfp_hf_client_test cvsd_plc_test pklg_cvsd_test
|
2015-08-07 21:45:00 +02:00
|
|
|
|
2016-01-31 20:31:52 +01:00
|
|
|
all: ${EXAMPLES}
|
2015-08-07 21:45:00 +02:00
|
|
|
|
|
|
|
clean:
|
2018-12-19 10:07:11 +01:00
|
|
|
rm -rf *.o $(EXAMPLES) $(CLIENT_EXAMPLES) *.dSYM *.wav results/* pklg/*.wav
|
2019-09-17 15:11:58 +02:00
|
|
|
rm -f *.gcno *.gcda
|
2015-08-07 21:45:00 +02:00
|
|
|
|
2020-06-09 17:04:45 +02:00
|
|
|
hfp_at_parser_test: ${COMMON_OBJ} hfp_gsm_model.o hfp_ag.o hfp.o hfp_at_parser_test.c
|
2018-12-21 12:12:02 +01:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS_CPPUTEST} -o $@
|
2015-08-20 17:06:54 +02:00
|
|
|
|
2015-08-26 18:31:31 +02:00
|
|
|
hfp_hf_client_test: ${MOCK_OBJ} hfp_hf.o hfp.o hfp_hf_client_test.c
|
2018-12-21 12:12:02 +01:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS_CPPUTEST} -o $@
|
2015-08-26 18:31:31 +02:00
|
|
|
|
2016-01-08 17:16:29 +01:00
|
|
|
hfp_ag_client_test: ${MOCK_OBJ} hfp_gsm_model.o hfp_ag.o hfp.o hfp_ag_client_test.c
|
2018-12-21 12:12:02 +01:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS_CPPUTEST} -o $@
|
2015-09-23 16:58:34 +02:00
|
|
|
|
2016-09-14 17:30:47 +02:00
|
|
|
cvsd_plc_test: ${COMMON_OBJ} btstack_cvsd_plc.o wav_util.o cvsd_plc_test.c
|
2018-12-21 12:12:02 +01:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS_CPPUTEST} -o $@
|
2016-08-29 23:10:32 +02:00
|
|
|
|
2018-12-21 12:06:20 +01:00
|
|
|
pklg_cvsd_test: hci_dump.o btstack_util.o btstack_cvsd_plc.o wav_util.o pklg_cvsd_test.o
|
2018-12-21 12:12:02 +01:00
|
|
|
${CC} $^ ${CFLAGS} -o $@
|
2018-12-17 14:34:33 +01:00
|
|
|
|
2015-08-20 17:06:54 +02:00
|
|
|
test: all
|
2016-11-16 11:21:23 +01:00
|
|
|
mkdir -p results
|
2020-06-09 17:04:45 +02:00
|
|
|
./hfp_at_parser_test
|
2015-09-23 16:58:34 +02:00
|
|
|
./hfp_ag_client_test
|
2015-11-11 12:15:35 +01:00
|
|
|
./hfp_hf_client_test
|
2016-08-29 23:10:32 +02:00
|
|
|
./cvsd_plc_test
|
2018-12-17 14:34:33 +01:00
|
|
|
|
|
|
|
pklg-test: pklg_cvsd_test
|
|
|
|
./pklg_cvsd_test pklg/test1
|
|
|
|
./pklg_cvsd_test pklg/test2
|
|
|
|
./pklg_cvsd_test pklg/test3
|
|
|
|
./pklg_cvsd_test pklg/test4
|
2018-12-17 15:13:56 +01:00
|
|
|
./pklg_cvsd_test pklg/test5
|