btstack/test/obex/Makefile

45 lines
1.0 KiB
Makefile
Raw Normal View History

2019-03-25 10:02:58 +01:00
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
2019-03-25 10:02:58 +01:00
LDFLAGS += -lCppUTest -lCppUTestExt
VPATH += ${BTSTACK_ROOT}/src/ble
VPATH += ${BTSTACK_ROOT}/src
VPATH += ${BTSTACK_ROOT}/src/classic
2019-03-25 10:02:58 +01:00
VPATH += ${BTSTACK_ROOT}/platform/posix
COMMON = \
btstack_util.c \
hci_dump.c \
obex_message_builder.c \
COMMON_OBJ = $(addprefix build-coverage/,$(COMMON:.c=.o))
2019-03-25 10:02:58 +01:00
all: build-coverage/obex_message_builder_test
2019-03-25 10:02:58 +01:00
build-coverage:
mkdir -p build-coverage
build-coverage/%.o: %.c | build-coverage
${CC} -c $(CFLAGS) ${CPPFLAGS} $< -o $@
build-coverage/obex_message_builder_test: ${COMMON_OBJ} build-coverage/obex_message_builder_test.o | build-coverage
2019-03-25 10:02:58 +01:00
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
test: all
build-coverage/obex_message_builder_test
2019-03-25 10:02:58 +01:00
coverage: all
build-coverage/obex_message_builder_test
2019-03-25 10:02:58 +01:00
clean:
rm -fr build-coverage *.dSYM *.o
rm -f *.gcno *.gcda
2019-03-25 10:02:58 +01:00