44 lines
1000 B
Makefile
Raw Normal View History

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
CFLAGS += -fprofile-arcs -ftest-coverage
LDFLAGS += -lCppUTest -lCppUTestExt
2015-11-13 15:04:41 +01:00
VPATH += ${BTSTACK_ROOT}/src/ble
VPATH += ${BTSTACK_ROOT}/src
2016-01-20 14:20:47 +01:00
VPATH += ${BTSTACK_ROOT}/platform/posix
COMMON = \
btstack_linked_list.c \
2017-11-17 18:04:16 +01:00
hci_dump.c \
btstack_util.c \
COMMON_OBJ = $(addprefix build-coverage/,$(COMMON:.c=.o))
all: build-coverage/btstack_linked_list_test
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
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
test: all
build-coverage/btstack_linked_list_test
coverage: all
build-coverage/btstack_linked_list_test
clean:
rm -f *.gcno *.gcda
rm -fr *.dSYM build-coverage