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/ble 12VPATH += ${BTSTACK_ROOT}/src 13VPATH += ${BTSTACK_ROOT}/platform/posix 14 15COMMON = \ 16 btstack_linked_list.c \ 17 btstack_memory.c \ 18 btstack_memory_pool.c \ 19 btstack_run_loop.c \ 20 btstack_run_loop_posix.c \ 21 btstack_util.c \ 22 hci.c \ 23 hci_cmd.c \ 24 hci_dump.c \ 25 26COMMON_OBJ = $(COMMON:.c=.o) 27 28all: ad_parser_test 29 30ad_parser_test: ${CORE_OBJ} ${COMMON_OBJ} ad_parser_test.c 31 ${CC} ${CORE_OBJ} ${COMMON_OBJ} ad_parser_test.c ${CFLAGS} ${LDFLAGS} -o $@ 32 33test: all 34 ./ad_parser_test 35 36clean: 37 rm -f ad_parser_test 38 rm -f *.o 39 rm -rf *.dSYM 40 rm -f *.gcno *.gcda 41 42