1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-28 22:49:47 +01:00

sys/random: move dependency resolution in its own Makefile.dep

This commit is contained in:
Alexandre Abadie 2023-04-21 10:06:54 +02:00
parent db19f6f546
commit c8d4256c84
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
2 changed files with 31 additions and 34 deletions

View File

@ -405,40 +405,6 @@ ifneq (,$(filter entropy_source_%,$(USEMODULE)))
USEMODULE += entropy_source
endif
ifneq (,$(filter random,$(USEMODULE)))
DEFAULT_MODULE += auto_init_random
USEMODULE += prng
ifneq (,$(filter prng_fortuna,$(USEMODULE)))
USEMODULE += fortuna
USEMODULE += hashes
USEMODULE += crypto
ifneq (,$(filter fortuna_reseed,$(USEMODULE)))
USEMODULE += atomic_utils
USEMODULE += xtimer
endif
endif
ifneq (,$(filter prng_tinymt32,$(USEMODULE)))
USEMODULE += tinymt32
endif
ifneq (,$(filter prng_sha%prng,$(USEMODULE)))
USEMODULE += prng_shaxprng
USEMODULE += hashes
endif
ifneq (,$(filter prng_hwrng,$(USEMODULE)))
FEATURES_REQUIRED += periph_hwrng
endif
ifeq (,$(filter puf_sram,$(USEMODULE)))
FEATURES_OPTIONAL += periph_hwrng
endif
USEMODULE += luid
endif
ifneq (,$(filter hashes,$(USEMODULE)))
USEMODULE += crypto
endif

31
sys/random/Makefile.dep Normal file
View File

@ -0,0 +1,31 @@
DEFAULT_MODULE += auto_init_random
USEMODULE += prng
ifneq (,$(filter prng_fortuna,$(USEMODULE)))
USEMODULE += fortuna
USEMODULE += hashes
USEMODULE += crypto
ifneq (,$(filter fortuna_reseed,$(USEMODULE)))
USEMODULE += atomic_utils
USEMODULE += xtimer
endif
endif
ifneq (,$(filter prng_tinymt32,$(USEMODULE)))
USEMODULE += tinymt32
endif
ifneq (,$(filter prng_sha%prng,$(USEMODULE)))
USEMODULE += prng_shaxprng
USEMODULE += hashes
endif
ifneq (,$(filter prng_hwrng,$(USEMODULE)))
FEATURES_REQUIRED += periph_hwrng
endif
ifeq (,$(filter puf_sram,$(USEMODULE)))
FEATURES_OPTIONAL += periph_hwrng
endif
USEMODULE += luid