Skip to content

Commit

Permalink
Move more configuration into riot.mk
Browse files Browse the repository at this point in the history
  • Loading branch information
LasseRosenow committed Dec 6, 2024
1 parent 3a26bd5 commit 9ce00c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
8 changes: 0 additions & 8 deletions examples/riot/hello_lf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,4 @@ QUIET ?= 1
# Enable reactor-uc features
# CFLAGS += -DNETWORK_CHANNEL_TCP_POSIX

include $(SRC_GEN_PATH)/Makefile

# Include generated c files
SRC += $(patsubst %, $(SRC_GEN_PATH)/%, $(LF_SOURCES)) main.c

# Include generated h files
CFLAGS += -I$(SRC_GEN_PATH)

include $(SRC_GEN_PATH)/reactor-uc/make/riot/riot.mk
14 changes: 13 additions & 1 deletion make/riot/riot.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
RIOT_MK_DIR := $(dir $(lastword $(MAKEFILE_LIST)))

# Include generated sources and makefiles if SRC_GEN_PATH is defined
ifdef SRC_GEN_PATH
include $(SRC_GEN_PATH)/Makefile

# Include generated c files
SRC += $(patsubst %, $(SRC_GEN_PATH)/%, $(LF_SOURCES)) main.c

# Include generated h files
CFLAGS += -I$(SRC_GEN_PATH)
endif

# Check if required environment variables exist
ifndef RIOTBASE
$(error RIOTBASE is not defined. Please define it!)
endif
Expand All @@ -23,7 +35,7 @@ QUIET ?= 1
# Use a peripheral timer for the delay, if available
FEATURES_OPTIONAL += periph_timer

# External modules
# Include reactor-uc as an external module
EXTERNAL_MODULE_DIRS += $(RIOT_MK_DIR)/external_modules
USEMODULE += reactor-uc

Expand Down

0 comments on commit 9ce00c4

Please sign in to comment.