2019-03-25 10:02:58 +01:00
|
|
|
CC=g++
|
|
|
|
|
|
|
|
# Requirements: cpputest.github.io
|
|
|
|
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
|
|
|
|
|
|
|
|
CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/include
|
2020-09-24 15:27:45 +02:00
|
|
|
CFLAGS += -fprofile-arcs -ftest-coverage
|
2019-03-25 10:02:58 +01:00
|
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
|
|
|
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src/ble
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
2019-03-26 15:48:00 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src/classic
|
2019-03-25 10:02:58 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix
|
|
|
|
|
|
|
|
COMMON = \
|
|
|
|
btstack_util.c \
|
|
|
|
hci_dump.c \
|
2019-03-26 15:48:00 +01:00
|
|
|
obex_message_builder.c \
|
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
COMMON_OBJ = $(addprefix build-coverage/,$(COMMON:.c=.o))
|
2019-03-25 10:02:58 +01:00
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
all: build-coverage/obex_message_builder_test
|
2019-03-25 10:02:58 +01:00
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
build-coverage:
|
|
|
|
mkdir -p build-coverage
|
|
|
|
|
|
|
|
build-coverage/%.o: %.c | build-coverage
|
|
|
|
${CC} -c $(CFLAGS) ${CPPFLAGS} $< -o $@
|
|
|
|
|
|
|
|
build-coverage/obex_message_builder_test: ${COMMON_OBJ} build-coverage/obex_message_builder_test.o | build-coverage
|
2019-03-25 10:02:58 +01:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
|
|
|
test: all
|
2020-11-30 21:35:42 +01:00
|
|
|
build-coverage/obex_message_builder_test
|
2019-03-25 10:02:58 +01:00
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
coverage: all
|
|
|
|
build-coverage/obex_message_builder_test
|
|
|
|
|
2019-03-25 10:02:58 +01:00
|
|
|
clean:
|
2020-11-30 21:35:42 +01:00
|
|
|
rm -fr build-coverage *.dSYM *.o
|
2019-09-17 15:11:58 +02:00
|
|
|
rm -f *.gcno *.gcda
|
2019-03-25 10:02:58 +01:00
|
|
|
|