11RIOT_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST ) ) )
22
3- # This has to be the absolute path to the RIOT base directory:
4- RIOTBASE ?= $(RIOT_MK_DIR ) /../../../RIOT
3+ # Include generated sources and makefiles if SRC_GEN_PATH is defined
4+ ifdef SRC_GEN_PATH
5+ include $(SRC_GEN_PATH ) /Makefile
6+
7+ # Include generated c files
8+ SRC += $(patsubst % , $(SRC_GEN_PATH ) /% , $(LF_SOURCES ) ) main.c
9+
10+ # Include generated h files
11+ CFLAGS += -I$(SRC_GEN_PATH )
12+ endif
13+
14+ # Check if required environment variables exist
15+ ifndef RIOTBASE
16+ $(error RIOTBASE is not defined. Please define it!)
17+ endif
18+
19+ ifndef EVENT_QUEUE_SIZE
20+ $(error EVENT_QUEUE_SIZE is not defined. Please define it!)
21+ endif
22+
23+ ifndef REACTION_QUEUE_SIZE
24+ $(error REACTION_QUEUE_SIZE is not defined. Please define it!)
25+ endif
526
627# Comment this out to disable code in RIOT that does safety checking
728# which is not needed in a production environment but helps in the
@@ -14,10 +35,12 @@ QUIET ?= 1
1435# Use a peripheral timer for the delay, if available
1536FEATURES_OPTIONAL += periph_timer
1637
17- # External modules
38+ # Include reactor-uc as an external module
1839EXTERNAL_MODULE_DIRS += $(RIOT_MK_DIR ) /external_modules
1940USEMODULE += reactor-uc
2041
21-
42+ # Apply project reactor-uc configuration variables
43+ CFLAGS += -DEVENT_QUEUE_SIZE=$(EVENT_QUEUE_SIZE )
44+ CFLAGS += -DREACTION_QUEUE_SIZE=$(REACTION_QUEUE_SIZE )
2245
2346include $(RIOTBASE ) /Makefile.include
0 commit comments