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