2019-09-20 13:16:20 +02:00
|
|
|
CC = g++
|
|
|
|
|
|
|
|
# Requirements: cpputest.github.io
|
|
|
|
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
|
|
|
|
CFLAGS = -g -Wall \
|
|
|
|
-I.. \
|
|
|
|
-I${BTSTACK_ROOT}/src
|
|
|
|
|
2020-09-24 15:27:45 +02:00
|
|
|
CFLAGS += -fprofile-arcs -ftest-coverage
|
2019-09-20 13:16:20 +02:00
|
|
|
|
|
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
|
|
|
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src/classic
|
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix
|
|
|
|
|
|
|
|
COMMON = \
|
|
|
|
btstack_util.c \
|
|
|
|
btstack_linked_list.c \
|
|
|
|
hci_dump.c \
|
|
|
|
avdtp_util.c \
|
|
|
|
|
|
|
|
COMMON_OBJ = $(COMMON:.c=.o)
|
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
all: build-coverage/avdtp_util_test
|
2019-09-20 13:16:20 +02:00
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
build-coverage:
|
|
|
|
mkdir -p build-coverage
|
|
|
|
|
|
|
|
build-coverage/avdtp_util_test: ${COMMON_OBJ} avdtp_util_test.o | build-coverage
|
2019-09-20 13:16:20 +02:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
|
|
|
test: all
|
|
|
|
rm -f *.gcda
|
2020-11-30 21:35:42 +01:00
|
|
|
build-coverage/avdtp_util_test
|
|
|
|
|
|
|
|
coverage: all
|
|
|
|
rm -f *.gcda
|
|
|
|
build-coverage/avdtp_util_test
|
2019-09-20 13:16:20 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f avdtp_util_test
|
|
|
|
rm -f *.o
|
2020-11-30 21:35:42 +01:00
|
|
|
rm -rf *.dSYM build-coverage
|
2019-09-20 13:16:20 +02:00
|
|
|
rm -f *.gcno *.gcda
|
|
|
|
|