mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-25 09:35:42 +00:00
44 lines
1000 B
Makefile
44 lines
1000 B
Makefile
CC=g++
|
|
|
|
# Requirements: cpputest.github.io
|
|
|
|
BTSTACK_ROOT = ../..
|
|
CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest
|
|
|
|
CFLAGS = -g -Wall -I. -I../ -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/include
|
|
CFLAGS += -fprofile-arcs -ftest-coverage
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src/ble
|
|
VPATH += ${BTSTACK_ROOT}/src
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix
|
|
|
|
COMMON = \
|
|
btstack_linked_list.c \
|
|
hci_dump.c \
|
|
btstack_util.c \
|
|
|
|
COMMON_OBJ = $(addprefix build-coverage/,$(COMMON:.c=.o))
|
|
|
|
all: build-coverage/btstack_linked_list_test
|
|
|
|
build-coverage:
|
|
mkdir -p build-coverage
|
|
|
|
build-coverage/%.o: %.c | build-coverage
|
|
${CC} -c $(CFLAGS) ${CPPFLAGS} $< -o $@
|
|
|
|
build-coverage/btstack_linked_list_test: ${COMMON_OBJ} build-coverage/btstack_linked_list_test.o | build-coverage
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
test: all
|
|
build-coverage/btstack_linked_list_test
|
|
|
|
coverage: all
|
|
build-coverage/btstack_linked_list_test
|
|
|
|
clean:
|
|
rm -f *.gcno *.gcda
|
|
rm -fr *.dSYM build-coverage
|
|
|