49 lines
861 B
Makefile
Raw Normal View History

2019-09-20 13:16:20 +02:00
CC = g++
# Requirements: cpputest.github.io
BTSTACK_ROOT = ../..
CFLAGS = -g -Wall \
-I.. \
-I${BTSTACK_ROOT}/src
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)
all: build-coverage/avdtp_util_test
2019-09-20 13:16:20 +02: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
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
rm -rf *.dSYM build-coverage
2019-09-20 13:16:20 +02:00
rm -f *.gcno *.gcda