1CC = g++ 2 3# Requirements: cpputest.github.io 4 5BTSTACK_ROOT = ../.. 6 7CFLAGS = -g -Wall -I. -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/include 8CFLAGS += -fprofile-arcs -ftest-coverage 9LDFLAGS += -lCppUTest -lCppUTestExt 10 11VPATH += ${BTSTACK_ROOT}/src 12VPATH += ${BTSTACK_ROOT}/src/classic 13VPATH += ${BTSTACK_ROOT}/platform/posix 14 15COMMON = \ 16 btstack_util.c \ 17 hci_dump.c \ 18 btstack_memory_pool.c \ 19 btstack_memory.c \ 20 21COMMON_OBJ = $(COMMON:.c=.o) 22 23all: btstack_memory_pool_test btstack_memory_test 24 25btstack_memory_pool_test: ${COMMON_OBJ} btstack_memory_pool_test.c 26 ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 27 28btstack_memory_test: ${COMMON_OBJ} btstack_memory_test.c 29 ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 30 31test: all 32 ./btstack_memory_pool_test 33 ./btstack_memory_test 34 35clean: 36 rm -f btstack_memory_pool_test *.o 37 rm -f btstack_memory_test *.o 38 rm -rf *.dSYM 39 rm -f *.gcno *.gcda 40 41