2015-05-23 23:35:37 +02:00
|
|
|
CC = g++
|
|
|
|
|
2015-07-03 11:18:03 +02:00
|
|
|
# Requirements: cpputest.github.io
|
2015-05-23 23:35:37 +02:00
|
|
|
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
|
2015-11-13 15:04:41 +01:00
|
|
|
CFLAGS = -g -Wall \
|
2020-01-09 20:02:07 +01:00
|
|
|
-I. \
|
2015-11-13 15:04:41 +01:00
|
|
|
-I${BTSTACK_ROOT}/src
|
2020-01-09 20:02:07 +01:00
|
|
|
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/rijndael
|
|
|
|
|
2020-09-24 15:27:45 +02:00
|
|
|
CFLAGS += -fprofile-arcs -ftest-coverage
|
2019-09-17 15:11:58 +02:00
|
|
|
|
2015-05-23 23:35:37 +02:00
|
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
|
|
|
|
2020-01-09 20:02:07 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
|
2015-05-23 23:35:37 +02:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
2015-11-13 15:04:41 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src/ble
|
2016-01-20 14:20:47 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix
|
2015-05-23 23:35:37 +02:00
|
|
|
|
|
|
|
COMMON = \
|
2016-01-20 16:10:07 +01:00
|
|
|
btstack_util.c \
|
2015-10-11 23:31:11 +02:00
|
|
|
hci_dump.c \
|
2015-05-23 23:35:37 +02:00
|
|
|
att_db_util.c \
|
2020-01-09 20:02:07 +01:00
|
|
|
btstack_crypto.c \
|
|
|
|
btstack_linked_list.c \
|
|
|
|
hci_cmd.c \
|
|
|
|
rijndael.c
|
2015-05-23 23:35:37 +02:00
|
|
|
|
|
|
|
COMMON_OBJ = $(COMMON:.c=.o)
|
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
all: build-coverage/att_db_util_test build-coverage/att_db_test
|
2015-05-23 23:35:37 +02:00
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
build-coverage:
|
|
|
|
mkdir -p build-coverage
|
|
|
|
|
|
|
|
build-coverage/att_db_util_test: ${COMMON_OBJ} att_db_util_test.c | build-coverage/
|
2015-05-23 23:35:37 +02:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2020-11-30 21:35:42 +01:00
|
|
|
build-coverage/att_db_test: att_db_test.c att_db.o btstack_util.o hci_dump.o att_db_util.o | build-coverage/
|
2020-09-15 17:54:28 +02:00
|
|
|
${CC} $^ ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2015-07-03 11:18:03 +02:00
|
|
|
test: all
|
2020-11-30 21:35:42 +01:00
|
|
|
build-coverage/att_db_util_test
|
|
|
|
build-coverage/att_db_test
|
|
|
|
|
|
|
|
coverage: all
|
|
|
|
build-coverage/att_db_util_test
|
|
|
|
build-coverage/att_db_test
|
2015-05-23 23:35:37 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f att_db_util_test
|
|
|
|
rm -f *.o
|
2020-11-30 21:35:42 +01:00
|
|
|
rm -rf *.dSYM build-coverage
|
2019-09-17 15:11:58 +02:00
|
|
|
rm -f *.gcno *.gcda
|
2018-06-26 13:40:35 +02:00
|
|
|
|