2017-12-04 13:55:17 +00:00
|
|
|
CC = g++
|
|
|
|
|
|
|
|
# Requirements: cpputest.github.io
|
|
|
|
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
|
|
|
|
CPPFLAGS = -x c++ -Wall -Wno-unused
|
2019-09-17 13:11:58 +00:00
|
|
|
|
|
|
|
CFLAGS = -DUNIT_TEST -g
|
2017-12-04 13:55:17 +00:00
|
|
|
CFLAGS += -I. -I.. -I${BTSTACK_ROOT}/src
|
2020-01-07 10:26:31 +00:00
|
|
|
CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
|
2017-12-04 13:55:17 +00:00
|
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
|
|
|
|
|
|
|
COMMON = \
|
|
|
|
|
|
|
|
COMMON_OBJ = $(COMMON:.c=.o)
|
|
|
|
|
|
|
|
|
|
|
|
all: hid_parser_test
|
|
|
|
|
|
|
|
hid_parser_test: btstack_hid_parser.c btstack_util.c hid_parser_test.c hci_dump.c
|
2019-09-15 17:34:25 +00:00
|
|
|
${CC} ${CFLAGS} ${CPPFLAGS} $^ ${LDFLAGS} -o $@
|
2017-12-04 13:55:17 +00:00
|
|
|
|
|
|
|
test: all
|
|
|
|
./hid_parser_test
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f hid_parser_test
|
|
|
|
rm -f *.o
|
|
|
|
rm -rf *.dSYM
|
2019-09-17 13:11:58 +00:00
|
|
|
rm -f *.gcno *.gcda
|
|
|
|
|