xref: /btstack/test/security_manager/Makefile (revision cd4b45e2726a71f78adde10eaef73452f969e90f)
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
9dd9e275cSMatthias RingwaldCFLAGS += -I. -I.. -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/platform/posix
1094d1976dSMatthias RingwaldCFLAGS += -I${BTSTACK_ROOT}/3rd-party/mbedtls/include
1157fe2af8SMatthias RingwaldLDFLAGS +=  -lCppUTest -lCppUTestExt
1257fe2af8SMatthias Ringwald
1357fe2af8SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src
143edc84c5SMatthias RingwaldVPATH += ${BTSTACK_ROOT}/src/ble
15dd9e275cSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/platform/posix
1694d1976dSMatthias RingwaldVPATH += ${BTSTACK_ROOT}/3rd-party/mbedtls/library
17fdcd1130S[email protected]
18fdcd1130S[email protected]COMMON = \
194ab92137SMatthias Ringwald    btstack_linked_list.c		\
2057fe2af8SMatthias Ringwald    btstack_memory.c			\
21d2e6c4b7SMatthias Ringwald    btstack_memory_pool.c		\
224ab92137SMatthias Ringwald    btstack_run_loop.c			\
238f2a52f4SMatthias Ringwald    btstack_run_loop_posix.c    \
2456042629SMatthias Ringwald    hci_cmd.c					\
2557fe2af8SMatthias Ringwald    hci_dump.c					\
2657fe2af8SMatthias Ringwald    le_device_db_memory.c       \
27a484130cSMatthias Ringwald    mock.c 				        \
284ab92137SMatthias Ringwald    rijndael.c 					\
294ab92137SMatthias Ringwald    sm.c     					\
30eb886013SMatthias Ringwald    btstack_util.c			            \
31fdcd1130S[email protected]
32fdcd1130S[email protected]COMMON_OBJ = $(COMMON:.c=.o)
33fdcd1130S[email protected]
3494d1976dSMatthias RingwaldMBEDTLS = \
3594d1976dSMatthias Ringwald	ecp.c \
3694d1976dSMatthias Ringwald	ecp_curves.c \
37*cd4b45e2SMatthias Ringwald	bignum.c \
38*cd4b45e2SMatthias Ringwald	# aes.c \
39*cd4b45e2SMatthias Ringwald	# aesni.c \
40*cd4b45e2SMatthias Ringwald	# asn1parse.c \
41*cd4b45e2SMatthias Ringwald	# asn1write.c \
42*cd4b45e2SMatthias Ringwald	# base64.c \
43*cd4b45e2SMatthias Ringwald	# ctr_drbg.c \
44*cd4b45e2SMatthias Ringwald	# entropy.c \
45*cd4b45e2SMatthias Ringwald	# entropy_poll.c \
46*cd4b45e2SMatthias Ringwald	# error.c \
47*cd4b45e2SMatthias Ringwald	# md.c \
48*cd4b45e2SMatthias Ringwald	# md5.c \
49*cd4b45e2SMatthias Ringwald	# md_wrap.c \
50*cd4b45e2SMatthias Ringwald	# oid.c \
51*cd4b45e2SMatthias Ringwald	# pem.c \
52*cd4b45e2SMatthias Ringwald	# pk.c \
53*cd4b45e2SMatthias Ringwald	# pk_wrap.c \
54*cd4b45e2SMatthias Ringwald	# pkwrite.c \
55*cd4b45e2SMatthias Ringwald	# sha256.c \
56*cd4b45e2SMatthias Ringwald	# sha512.c \
57*cd4b45e2SMatthias Ringwald	# timing.c \
5894d1976dSMatthias Ringwald
5994d1976dSMatthias Ringwaldall: security_manager aestest ectest aes_cmac_test
60fdcd1130S[email protected]
61fdcd1130S[email protected]security_manager: ${CORE_OBJ} ${COMMON_OBJ} security_manager.c
6294d1976dSMatthias Ringwald	${CC} ${CORE_OBJ} ${COMMON_OBJ} security_manager.c ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@
63fdcd1130S[email protected]
64e2bc2c15S[email protected]aestest: aestest.c rijndael.c
65e30c0588SMatthias Ringwald	${CC} ${CFLAGS} rijndael.c aestest.c -o $@
66e2bc2c15S[email protected]
6794d1976dSMatthias Ringwaldectest: ectest.c ${MBEDTLS} rijndael.c
6894d1976dSMatthias Ringwald	gcc ${CFLAGS} $^ -o $@
6994d1976dSMatthias Ringwald
70*cd4b45e2SMatthias Ringwaldaes_cmac_test: aes_cmac_test.c rijndael.c
7194d1976dSMatthias Ringwald	gcc ${CFLAGS} $^ -o $@
7294d1976dSMatthias Ringwald
738e8dfe94SMatthias Ringwaldtest: all
7457fe2af8SMatthias Ringwald	./security_manager
7557fe2af8SMatthias Ringwald	./aestest
7657fe2af8SMatthias Ringwald
77fdcd1130S[email protected]clean:
78fdcd1130S[email protected]	rm -f  security_manager
79cbe987fbSMatthias Ringwald	rm -f  *.o
80fdcd1130S[email protected]	rm -rf *.dSYM
81fdcd1130S[email protected]