test/crypto: add CMake project

This commit is contained in:
Matthias Ringwald 2020-07-02 16:03:45 +02:00
parent 4578e022e0
commit cc02325a4e
2 changed files with 37 additions and 3 deletions

View File

@ -0,0 +1,37 @@
cmake_minimum_required (VERSION 3.5)
project(test-crypto)
include_directories(../../3rd-party/micro-ecc)
include_directories(../../3rd-party/rijndael)
include_directories(../../src)
include_directories(..)
add_executable(aes_ccm_test
../../3rd-party/rijndael/rijndael.c
../../src/btstack_crypto.c
../../src/btstack_linked_list.c
../../src/hci_cmd.c
../../src/btstack_util.c
../../src/hci_dump.c
aes_ccm.c
aes_ccm_test.c
aes_cmac.c
mock.c
)
add_executable(aestest
../../3rd-party/rijndael/rijndael.c
aestest.c
)
add_executable(ecc_micro_ecc
../../3rd-party/micro-ecc/uECC.c
ecc_micro_ecc.c
)
add_executable(aes_cmac_test
../../3rd-party/rijndael/rijndael.c
aes_cmac_test.c
aes_cmac.c
)

View File

@ -41,9 +41,6 @@ ecc_micro_ecc: ecc_micro_ecc.o ${MICROECC}
aes_cmac_test: aes_cmac_test.o aes_cmac.o rijndael.o
gcc ${CFLAGS} $^ -o $@
sm_mbedtls_allocator_test: sm_mbedtls_allocator.o hci_dump.o btstack_util.o sm_mbedtls_allocator_test.c
${CC} sm_mbedtls_allocator.o btstack_util.o hci_dump.o sm_mbedtls_allocator_test.c ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@
test: all
./aes_cmac_test
./aestest