1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys: random: make use of submodules in Makefile

This commit is contained in:
Kaspar Schleiser 2017-08-30 23:49:30 +02:00
parent 5dd38c68e2
commit 88433cba2f
5 changed files with 8 additions and 12 deletions

View File

@ -596,6 +596,7 @@ ifneq (,$(filter conn_can,$(USEMODULE)))
endif
ifneq (,$(filter random,$(USEMODULE)))
USEMODULE += prng
# select default prng
ifeq (,$(filter prng_%,$(USEMODULE)))
USEMODULE += prng_tinymt32

View File

@ -53,6 +53,8 @@ PSEUDOMODULES += openthread
PSEUDOMODULES += pktqueue
PSEUDOMODULES += posix
PSEUDOMODULES += printf_float
PSEUDOMODULES += prng
PSEUDOMODULES += prng_%
PSEUDOMODULES += saul_adc
PSEUDOMODULES += saul_default
PSEUDOMODULES += saul_gpio

View File

@ -80,7 +80,7 @@
#include "net/fib.h"
#endif
#ifdef MODULE_TINYMT32
#ifdef MODULE_PRNG
#include "random.h"
#endif
@ -93,7 +93,7 @@
void auto_init(void)
{
#ifdef MODULE_TINYMT32
#ifdef MODULE_PRNG
random_init(0);
#endif
#ifdef MODULE_XTIMER

View File

@ -1,14 +1,7 @@
ifneq (,$(filter prng_mersenne,$(USEMODULE)))
SRC += mersenne.c
endif
ifneq (,$(filter prng_minstd,$(USEMODULE)))
SRC += minstd.c
endif
ifneq (,$(filter prng_musl_lcg,$(USEMODULE)))
SRC += musl_lcg.c
endif
BASE_MODULE := prng
SUBMODULES := 1
ifneq (,$(filter prng_tinymt32,$(USEMODULE)))
SRC += prng_tinymt32.c
DIRS += tinymt32
endif