2019-04-06 21:08:09 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2019-07-24 03:16:24 +08:00
|
|
|
if (CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR OR
|
|
|
|
CONFIG_TIMER_RANDOM_GENERATOR OR
|
|
|
|
CONFIG_XOROSHIRO_RANDOM_GENERATOR)
|
|
|
|
zephyr_library()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_TIMER_RANDOM_GENERATOR rand32_timer.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_XOROSHIRO_RANDOM_GENERATOR rand32_xoroshiro128.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_CTR_DRBG_CSPRNG_GENERATOR rand32_ctr_drbg.c)
|
|
|
|
|
|
|
|
if (CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR OR CONFIG_HARDWARE_DEVICE_CS_GENERATOR)
|
|
|
|
zephyr_library_sources(rand32_entropy_device.c)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (CONFIG_CTR_DRBG_CSPRNG_GENERATOR)
|
|
|
|
zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)
|
|
|
|
endif()
|