2016-11-14 13:59:29 +00: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
|
|
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
|
|
|
|
2020-11-30 20:35:42 +00:00
|
|
|
COMMON_OBJ = $(addprefix build-coverage/,$(COMMON:.c=.o))
|
2016-11-14 13:59:29 +00:00
|
|
|
|
2020-11-30 20:35:42 +00:00
|
|
|
all: build-coverage/sqrt_test
|
2016-11-14 13:59:29 +00:00
|
|
|
|
2020-11-30 20:35:42 +00:00
|
|
|
build-coverage:
|
|
|
|
mkdir -p build-coverage
|
|
|
|
|
|
|
|
build-coverage/%.o: %.c | build-coverage
|
|
|
|
${CC} -c $(CFLAGS) ${CPPFLAGS} $< -o $@
|
|
|
|
|
|
|
|
build-coverage/sqrt_test: ${COMMON_OBJ} build-coverage/sqrt_test.o | build-coverage
|
2016-11-14 13:59:29 +00:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
|
|
|
test: all
|
2020-11-30 20:35:42 +00:00
|
|
|
build-coverage/sqrt_test
|
2016-11-14 13:59:29 +00:00
|
|
|
|
2020-11-30 20:35:42 +00:00
|
|
|
coverage: all
|
|
|
|
build-coverage/sqrt_test
|
|
|
|
|
2016-11-14 13:59:29 +00:00
|
|
|
clean:
|
2020-11-30 20:35:42 +00:00
|
|
|
rm -fr build-coverage *.dSYM
|
2016-11-14 13:59:29 +00:00
|
|
|
|