|
|
@@ -8,10 +8,6 @@ set(CMAKE_VERBOSE_MAKEFILE ON) |
|
|
|
set(UPQCL_LIBRARY_VER ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) |
|
|
|
set(CMAKE_C_STANDARD 99) |
|
|
|
|
|
|
|
if(PLATFORM STREQUAL "stm32disco") |
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/platform/stm32disco) |
|
|
|
endif() |
|
|
|
|
|
|
|
# Global configuration |
|
|
|
string(APPEND CMAKE_C_FLAGS "-Os ") |
|
|
|
string(APPEND CMAKE_C_FLAGS "-Wno-ignored-qualifiers ") |
|
|
@@ -35,8 +31,6 @@ set(uEXAMPLE_SRC |
|
|
|
${PROJECT_SOURCE_DIR}/src/common/keccakf1600.S |
|
|
|
${PROJECT_SOURCE_DIR}/src/common/crypto_hashblocks_sha512_inner32.s |
|
|
|
${PROJECT_SOURCE_DIR}/src/common/crypto_hashblocks_sha512.c |
|
|
|
${PROJECT_SOURCE_DIR}/src/common/randombytes.c |
|
|
|
#${PROJECT_SOURCE_DIR}/src/common/hal-stm32f4.c |
|
|
|
${PROJECT_SOURCE_DIR}/src/saber/cbd.c |
|
|
|
${PROJECT_SOURCE_DIR}/src/saber/kem.c |
|
|
|
${PROJECT_SOURCE_DIR}/src/saber/mul.S |
|
|
@@ -50,23 +44,15 @@ set(uEXAMPLE_SRC |
|
|
|
${PROJECT_SOURCE_DIR}/src/saber/verify.c) |
|
|
|
|
|
|
|
add_library( |
|
|
|
uexample_obj OBJECT |
|
|
|
example STATIC |
|
|
|
${uEXAMPLE_SRC}) |
|
|
|
|
|
|
|
target_include_directories( |
|
|
|
uexample_obj PRIVATE |
|
|
|
example PRIVATE |
|
|
|
#${PROJECT_SOURCE_DIR}/3rd/libopencm3/include |
|
|
|
${PROJECT_SOURCE_DIR}/src/common |
|
|
|
${PROJECT_SOURCE_DIR}/src/sabre) |
|
|
|
|
|
|
|
add_executable( |
|
|
|
uexample_test |
|
|
|
${uEXAMPLE_SRC} |
|
|
|
${PROJECT_SOURCE_DIR}/src/test.c |
|
|
|
) |
|
|
|
|
|
|
|
target_include_directories( |
|
|
|
uexample_test PRIVATE |
|
|
|
#${PROJECT_SOURCE_DIR}/3rd/libopencm3/include |
|
|
|
${PROJECT_SOURCE_DIR}/src/common |
|
|
|
${PROJECT_SOURCE_DIR}/src/saber) |
|
|
|
if(PLATFORM STREQUAL "stm32disco") |
|
|
|
add_subdirectory(${PROJECT_SOURCE_DIR}/platform/stm32disco) |
|
|
|
endif() |