1CC=g++ 2 3BTSTACK_ROOT = ../.. 4CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest 5 6COMMON_OBJ = \ 7 btstack_tlv_posix.o \ 8 btstack_util.o \ 9 btstack_linked_list.o \ 10 hci_dump.o \ 11 12VPATH = \ 13 ${BTSTACK_ROOT}/src \ 14 ${BTSTACK_ROOT}/src/classic \ 15 ${BTSTACK_ROOT}/src/ble \ 16 ${BTSTACK_ROOT}/platform/posix \ 17 18CFLAGS = \ 19 -DBTSTACK_TEST \ 20 -g \ 21 -Wall \ 22 -Wmissing-prototypes \ 23 -Wnarrowing \ 24 -I. \ 25 -I.. \ 26 -I${BTSTACK_ROOT}/src \ 27 -I${BTSTACK_ROOT}/platform/posix \ 28 29LDFLAGS += -lCppUTest -lCppUTestExt 30 31TESTS = tlv_test 32 33all: ${TESTS} 34 35clean: 36 rm -rf *.o $(TESTS) *.dSYM *.pklg 37 38tlv_test: ${COMMON_OBJ} tlv_test.o 39 ${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@ 40 41test: all 42 @echo Run all test 43 @set -e; \ 44 for test in $(TESTS); do \ 45 ./$$test; \ 46 done 47 48