2014-06-16 20:55:54 +00:00
|
|
|
CC=g++
|
|
|
|
|
2015-07-03 11:18:03 +02:00
|
|
|
# Requirements: cpputest.github.io
|
2014-06-16 20:55:54 +00:00
|
|
|
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
|
|
|
|
|
2015-07-03 11:18:03 +02:00
|
|
|
CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/include
|
2019-09-17 15:11:58 +02:00
|
|
|
CFLAGS += -fprofile-arcs -ftest-coverage
|
2015-05-17 18:07:24 +02:00
|
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
2014-06-16 20:55:54 +00:00
|
|
|
|
2015-11-13 15:04:41 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src/ble
|
2015-05-17 18:07:24 +02:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
2016-01-20 14:20:47 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix
|
2014-06-16 20:55:54 +00:00
|
|
|
|
2015-05-17 18:07:24 +02:00
|
|
|
COMMON = \
|
2016-01-20 14:34:04 +01:00
|
|
|
btstack_linked_list.c \
|
2017-11-17 18:04:16 +01:00
|
|
|
hci_dump.c \
|
|
|
|
btstack_util.c \
|
2014-06-16 20:55:54 +00:00
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
COMMON_OBJ = $(addprefix build-coverage/,$(COMMON:.c=.o))
|
2014-06-16 20:55:54 +00:00
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
all: build-coverage/btstack_linked_list_test
|
2014-06-16 20:55:54 +00: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/btstack_linked_list_test: ${COMMON_OBJ} build-coverage/btstack_linked_list_test.o | build-coverage
|
2014-06-16 20:55:54 +00:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2015-07-03 11:18:03 +02:00
|
|
|
test: all
|
2020-11-30 21:35:42 +01:00
|
|
|
build-coverage/btstack_linked_list_test
|
2015-05-17 18:07:24 +02:00
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
coverage: all
|
|
|
|
build-coverage/btstack_linked_list_test
|
|
|
|
|
2014-06-16 20:55:54 +00:00
|
|
|
clean:
|
2019-09-17 15:11:58 +02:00
|
|
|
rm -f *.gcno *.gcda
|
2020-11-30 21:35:42 +01:00
|
|
|
rm -fr *.dSYM build-coverage
|
|
|
|
|