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

sys/preprocessor: add preprocessor module

This commit is contained in:
Fabian Hüßler 2022-06-20 09:50:56 +02:00
parent fad66e4a50
commit b4dcbba26d
5 changed files with 32 additions and 0 deletions

View File

@ -2,6 +2,10 @@
# end of the dependency loop. They MAY inlcude new modules, but this modules
# MUST NOT have dependencies themselfs.
ifneq (,$(filter auto_init%,$(USEMODULE)))
USEMODULE += preprocessor preprocessor_successor
endif
ifneq (,$(filter auto_init_ztimer,$(USEMODULE)))
USEMODULE += ztimer_init
endif

View File

@ -173,6 +173,9 @@ endif
ifneq (,$(filter pthread,$(USEMODULE)))
DIRS += posix/pthread
endif
ifneq (,$(filter preprocessor_%,$(USEMODULE)))
DIRS += preprocessor
endif
ifneq (,$(filter routing,$(USEMODULE)))
DIRS += net/routing
endif

View File

@ -181,3 +181,7 @@ endif
ifneq (,$(filter tiny_strerror,$(USEMODULE)))
include $(RIOTBASE)/sys/tiny_strerror/Makefile.include
endif
ifneq (,$(filter preprocessor_%,$(USEMODULE)))
include $(RIOTBASE)/sys/preprocessor/Makefile.include
endif

View File

@ -0,0 +1,3 @@
MODULE := preprocessor
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,18 @@
RIOT_PP_SUCCESSOR_MAX ?= 9999
PSEUDOMODULES += preprocessor_successor
USEMODULE_INCLUDES_preprocessor := $(BINDIR)/preprocessor
USEMODULE_INCLUDES += $(USEMODULE_INCLUDES_preprocessor)
RIOT_GENERATE_PP_HEADERS :=
ifneq (,$(filter preprocessor_successor,$(USEMODULE)))
RIOT_GENERATE_PP_HEADERS += $(BINDIR)/preprocessor/preprocessor_successor.h
endif
BUILDDEPS += $(RIOT_GENERATE_PP_HEADERS)
$(BINDIR)/preprocessor/preprocessor_successor.h:
@mkdir -p '$(dir $@)'
$(Q)'$(RIOTTOOLS)/generate_pp_successor_header/generate_pp_successor_header.sh' $(RIOT_PP_SUCCESSOR_MAX) > $@