xref: /btstack/test/security_manager/Makefile (revision 90fe6d5fb12748fc92b6d59b439a2a7fbfd9d937)
1fdcd1130S[email protected]CC = g++
2fdcd1130S[email protected]
38e8dfe94SMatthias Ringwald# Requirements: cpputest.github.io
4fdcd1130S[email protected]
5fdcd1130S[email protected]BTSTACK_ROOT =  ../..
6fdcd1130S[email protected]
794d1976dSMatthias RingwaldCFLAGS  = -DUNIT_TEST -g
894d1976dSMatthias RingwaldCPPFLAGS =  -x c++ -Wall -Wno-unused
9*90fe6d5fSMatthias RingwaldCFLAGS += -I. -I.. -I${BTSTACK_ROOT}/src
10*90fe6d5fSMatthias Ringwald#CFLAGS += -I${BTSTACK_ROOT}/platform/posix
11*90fe6d5fSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/platform/embedded
1294d1976dSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/mbedtls/include
13af03003cSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/micro-ecc
14f13fc290SMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/rijndael
15*90fe6d5fSMatthias Ringwald# CFLAGS += -fprofile-arcs -ftest-coverage -fsanitize=address,undefined
1657fe2af8SMatthias RingwaldLDFLAGS +=  -lCppUTest -lCppUTestExt
1757fe2af8SMatthias Ringwald
1857fe2af8SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src
193edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble
20*90fe6d5fSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/embedded
21*90fe6d5fSMatthias Ringwald# VPATH += ${BTSTACK_ROOT}/platform/posix
22af03003cSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/micro-ecc
23f13fc290SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/rijndael
24fdcd1130S[email protected]
25fdcd1130S[email protected]COMMON = \
266894dd39SMatthias Ringwald	btstack_crypto.c    		\
274ab92137SMatthias Ringwald	btstack_linked_list.c		\
2857fe2af8SMatthias Ringwald	btstack_memory.c			\
29d2e6c4b7SMatthias Ringwald	btstack_memory_pool.c		\
304ab92137SMatthias Ringwald	btstack_run_loop.c			\
31*90fe6d5fSMatthias Ringwald	btstack_run_loop_embedded.c \
3256042629SMatthias Ringwald	hci_cmd.c					\
3357fe2af8SMatthias Ringwald	hci_dump.c					\
3457fe2af8SMatthias Ringwald	le_device_db_memory.c       \
35a484130cSMatthias Ringwald	mock.c 				        \
364ab92137SMatthias Ringwald	rijndael.c 					\
374ab92137SMatthias Ringwald	sm.c     					\
38eb886013SMatthias Ringwald	btstack_util.c			            \
39489a58deSMatthias Ringwald	btstack_tlv.c \
40fdcd1130S[email protected]
41fdcd1130S[email protected]COMMON_OBJ = $(COMMON:.c=.o)
42fdcd1130S[email protected]
4394d1976dSMatthias RingwaldMBEDTLS = \
4494d1976dSMatthias Ringwald	ecp.c \
4594d1976dSMatthias Ringwald	ecp_curves.c \
46cd4b45e2SMatthias Ringwald	bignum.c \
4794d1976dSMatthias Ringwald
48af03003cSMatthias RingwaldMICROECC = \
49af03003cSMatthias Ringwald	uECC.c
50af03003cSMatthias Ringwald
51bdcc259dSMatthias Ringwaldall: security_manager
52fdcd1130S[email protected]
53fdcd1130S[email protected]security_manager: ${CORE_OBJ} ${COMMON_OBJ} security_manager.c
5494d1976dSMatthias Ringwald	${CC} ${CORE_OBJ} ${COMMON_OBJ} security_manager.c ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@
55fdcd1130S[email protected]
568e8dfe94SMatthias Ringwaldtest: all
5757fe2af8SMatthias Ringwald	./security_manager
5857fe2af8SMatthias Ringwald
59fdcd1130S[email protected]clean:
60bdcc259dSMatthias Ringwald	rm -f  security_manager
61cbe987fbSMatthias Ringwald	rm -f  *.o
62fdcd1130S[email protected]	rm -rf *.dSYM
63b338ca60SMatthias Ringwald	rm -f *.gcno *.gcda
64fdcd1130S[email protected]
65