1CC=g++ 2 3# Requirements: cpputest.github.io 4 5BTSTACK_ROOT = ../.. 6CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest 7 8CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src 9CFLAGS += -fprofile-arcs -ftest-coverage 10LDFLAGS += -lCppUTest -lCppUTestExt 11 12VPATH += ${BTSTACK_ROOT}/src 13 14COMMON = \ 15 btstack_ring_buffer.c \ 16 17COMMON_OBJ = $(COMMON:.c=.o) 18 19all: btstack_ring_buffer_test 20 21btstack_ring_buffer_test: ${COMMON_OBJ} btstack_ring_buffer_test.c 22 ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 23 24test: all 25 ./btstack_ring_buffer_test 26 27clean: 28 rm -fr btstack_ring_buffer_test *.dSYM *.o ../src/*.o *.gcda *.gcno 29 rm -f *.gcno *.gcda 30 31