2014-04-11 15:14:38 +00:00
|
|
|
CC = g++
|
|
|
|
|
2015-07-03 11:18:03 +02:00
|
|
|
# Requirements: cpputest.github.io
|
2014-04-11 15:14:38 +00:00
|
|
|
|
|
|
|
BTSTACK_ROOT = ../..
|
|
|
|
|
2016-05-04 16:08:44 +02:00
|
|
|
CFLAGS = -DUNIT_TEST -g
|
|
|
|
CPPFLAGS = -x c++ -Wall -Wno-unused
|
2020-09-16 10:24:43 +02:00
|
|
|
CFLAGS += -I. -I.. -I${BTSTACK_ROOT}/src
|
|
|
|
#CFLAGS += -I${BTSTACK_ROOT}/platform/posix
|
|
|
|
CFLAGS += -I${BTSTACK_ROOT}/platform/embedded
|
2016-05-04 16:08:44 +02:00
|
|
|
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/mbedtls/include
|
2017-04-13 13:57:37 +02:00
|
|
|
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/micro-ecc
|
2019-12-07 21:42:31 +01:00
|
|
|
CFLAGS += -I${BTSTACK_ROOT}/3rd-party/rijndael
|
2020-09-24 15:27:45 +02:00
|
|
|
CFLAGS += -fprofile-arcs -ftest-coverage
|
2015-05-17 18:07:24 +02:00
|
|
|
LDFLAGS += -lCppUTest -lCppUTestExt
|
|
|
|
|
|
|
|
VPATH += ${BTSTACK_ROOT}/src
|
2015-11-13 15:04:41 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/src/ble
|
2020-09-16 10:24:43 +02:00
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/embedded
|
|
|
|
# VPATH += ${BTSTACK_ROOT}/platform/posix
|
2017-04-13 13:57:37 +02:00
|
|
|
VPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
|
2019-12-07 21:42:31 +01:00
|
|
|
VPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
|
2014-04-11 15:14:38 +00:00
|
|
|
|
|
|
|
COMMON = \
|
2019-09-17 15:11:58 +02:00
|
|
|
btstack_crypto.c \
|
|
|
|
btstack_linked_list.c \
|
|
|
|
btstack_memory.c \
|
|
|
|
btstack_memory_pool.c \
|
|
|
|
btstack_run_loop.c \
|
2020-09-16 10:24:43 +02:00
|
|
|
btstack_run_loop_embedded.c \
|
2019-09-17 15:11:58 +02:00
|
|
|
hci_cmd.c \
|
|
|
|
hci_dump.c \
|
|
|
|
le_device_db_memory.c \
|
|
|
|
mock.c \
|
|
|
|
rijndael.c \
|
|
|
|
sm.c \
|
|
|
|
btstack_util.c \
|
2019-03-30 21:30:47 +01:00
|
|
|
btstack_tlv.c \
|
2019-09-17 15:11:58 +02:00
|
|
|
|
2014-04-11 15:14:38 +00:00
|
|
|
COMMON_OBJ = $(COMMON:.c=.o)
|
|
|
|
|
2016-05-04 16:08:44 +02:00
|
|
|
MBEDTLS = \
|
|
|
|
ecp.c \
|
|
|
|
ecp_curves.c \
|
2016-05-07 22:02:06 +02:00
|
|
|
bignum.c \
|
2016-05-04 16:08:44 +02:00
|
|
|
|
2017-04-13 13:57:37 +02:00
|
|
|
MICROECC = \
|
|
|
|
uECC.c
|
|
|
|
|
2018-10-26 10:32:43 +02:00
|
|
|
all: security_manager
|
2014-04-11 15:14:38 +00:00
|
|
|
|
|
|
|
security_manager: ${CORE_OBJ} ${COMMON_OBJ} security_manager.c
|
2016-05-04 16:08:44 +02:00
|
|
|
${CC} ${CORE_OBJ} ${COMMON_OBJ} security_manager.c ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@
|
2014-04-11 15:14:38 +00:00
|
|
|
|
2015-07-03 11:18:03 +02:00
|
|
|
test: all
|
2015-05-17 18:07:24 +02:00
|
|
|
./security_manager
|
|
|
|
|
2014-04-11 15:14:38 +00:00
|
|
|
clean:
|
2018-10-26 10:32:43 +02:00
|
|
|
rm -f security_manager
|
2015-05-14 08:25:34 +02:00
|
|
|
rm -f *.o
|
2014-04-11 15:14:38 +00:00
|
|
|
rm -rf *.dSYM
|
2019-09-17 15:11:58 +02:00
|
|
|
rm -f *.gcno *.gcda
|
2018-04-20 11:10:59 +02:00
|
|
|
|