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 ad_parser.c \ 19 20COMMON_OBJ = $(COMMON:.c=.o) 21 22all: ad_parser_test 23 24ad_parser_test: ${COMMON_OBJ} ad_parser_test.c 25 ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 26 27test: all 28 ./ad_parser_test 29 30clean: 31 rm -f ad_parser_test *.o 32 rm -rf *.dSYM 33 rm -f *.gcno *.gcda 34 35