From c8d4256c849373120995aeee8576ce6e4840e3d2 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 21 Apr 2023 10:06:54 +0200 Subject: [PATCH] sys/random: move dependency resolution in its own Makefile.dep --- sys/Makefile.dep | 34 ---------------------------------- sys/random/Makefile.dep | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 34 deletions(-) create mode 100644 sys/random/Makefile.dep diff --git a/sys/Makefile.dep b/sys/Makefile.dep index dad7ead251..4e20e9241b 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -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 diff --git a/sys/random/Makefile.dep b/sys/random/Makefile.dep new file mode 100644 index 0000000000..dcb5b0e9ad --- /dev/null +++ b/sys/random/Makefile.dep @@ -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