1CC = g++ 2 3# Requirements: cpputest.github.io 4 5BTSTACK_ROOT = ../.. 6 7CFLAGS = -g -Wall -I.. -I${BTSTACK_ROOT}/example/libusb -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include 8LDFLAGS += -L$(CPPUTEST_HOME)/lib -lCppUTest -lCppUTestExt 9 10VPATH += ${BTSTACK_ROOT}/ble 11VPATH += ${BTSTACK_ROOT}/src 12VPATH += ${BTSTACK_ROOT}/platforms/posix/src 13 14COMMON = \ 15 utils.c \ 16 btstack_memory.c \ 17 memory_pool.c \ 18 linked_list.c \ 19 sdp_util.c \ 20 remote_device_db_memory.c \ 21 run_loop.c \ 22 run_loop_posix.c \ 23 hci_cmds.c \ 24 hci_dump.c \ 25 hci.c \ 26 ad_parser.c \ 27 28COMMON_OBJ = $(COMMON:.c=.o) 29 30all: ad_parser 31 32ad_parser: ${CORE_OBJ} ${COMMON_OBJ} advertising_data_parser.c 33 ${CC} ${CORE_OBJ} ${COMMON_OBJ} advertising_data_parser.c ${CFLAGS} ${LDFLAGS} -o $@ 34 35test: all 36 ./ad_parser 37 38clean: 39 rm -f ad_parser le_central 40 rm -f *.o 41 rm -rf *.dSYM 42