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