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 = ../..
|
|
|
|
|
2015-07-27 20:51:29 +00:00
|
|
|
CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wno-unused -I. -I.. -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include
|
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
|
|
|
|
VPATH += ${BTSTACK_ROOT}/platform/posix/src
|
2014-04-11 15:14:38 +00:00
|
|
|
|
|
|
|
COMMON = \
|
2015-05-17 16:07:24 +00:00
|
|
|
utils.c \
|
|
|
|
btstack_memory.c \
|
|
|
|
memory_pool.c \
|
2016-01-06 16:31:20 +00:00
|
|
|
bk_linked_list.c \
|
2015-05-17 16:07:24 +00:00
|
|
|
run_loop.c \
|
|
|
|
run_loop_posix.c \
|
|
|
|
hci_cmds.c \
|
|
|
|
hci_dump.c \
|
|
|
|
sm.c \
|
|
|
|
le_device_db_memory.c \
|
2016-01-06 16:31:20 +00:00
|
|
|
rijndael.c \
|
|
|
|
mock.c \
|
2014-04-11 15:14:38 +00:00
|
|
|
|
|
|
|
COMMON_OBJ = $(COMMON:.c=.o)
|
|
|
|
|
2014-04-12 21:21:46 +00:00
|
|
|
all: security_manager aestest
|
2014-04-11 15:14:38 +00:00
|
|
|
|
|
|
|
security_manager: ${CORE_OBJ} ${COMMON_OBJ} security_manager.c
|
|
|
|
${CC} ${CORE_OBJ} ${COMMON_OBJ} security_manager.c ${CFLAGS} ${LDFLAGS} -o $@
|
|
|
|
|
2014-04-12 21:21:46 +00:00
|
|
|
aestest: aestest.c rijndael.c
|
2015-07-16 21:44:53 +00:00
|
|
|
${CC} ${CFLAGS} rijndael.c aestest.c -o $@
|
2014-04-12 21:21:46 +00:00
|
|
|
|
2015-07-03 09:18:03 +00:00
|
|
|
test: all
|
2015-05-17 16:07:24 +00:00
|
|
|
./security_manager
|
|
|
|
./aestest
|
|
|
|
|
2014-04-11 15:14:38 +00:00
|
|
|
clean:
|
|
|
|
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
|
|
|
|
|