Skip to content

Commit

Permalink
Rename SRC_GEN_PATH to LF_SRC_GEN_PATH in riot.mk
Browse files Browse the repository at this point in the history
  • Loading branch information
LasseRosenow committed Dec 11, 2024
1 parent 772f9ca commit 4a26677
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions examples/riot/hello_lf/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# name of your application
APPLICATION = HelloLF
LF_MAIN = HelloLF

# This has to be the absolute path to the RIOT base directory:
# TODO: In the lingo template this should point to ./RIOT because we plan to include RIOT as a submodule there
RIOTBASE ?= $(CURDIR)/../../../../RIOT

# Path of generated lf c-code
SRC_GEN_PATH = $(CURDIR)/src-gen/$(APPLICATION)
LF_SRC_GEN_PATH = $(CURDIR)/src-gen/$(LF_MAIN)

# TODO: Can we call lfc here directly?

Expand All @@ -24,4 +24,4 @@ QUIET ?= 1
# Enable reactor-uc features
# CFLAGS += -DNETWORK_CHANNEL_TCP_POSIX

include $(SRC_GEN_PATH)/reactor-uc/make/riot/riot.mk
include $(LF_SRC_GEN_PATH)/reactor-uc/make/riot/riot.mk
15 changes: 9 additions & 6 deletions make/riot/riot.mk
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
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 sources and makefiles if LF_SRC_GEN_PATH is defined
ifdef LF_SRC_GEN_PATH
include $(LF_SRC_GEN_PATH)/Makefile

# Name of your RIOT application
APPLICATION ?= $(LF_MAIN)

# Include generated c files
SRC += $(patsubst %, $(SRC_GEN_PATH)/%, $(LFC_GEN_SOURCES))
SRC += $(patsubst %, $(LF_SRC_GEN_PATH)/%, $(LFC_GEN_SOURCES))

# Include generated main file
SRC += $(SRC_GEN_PATH)/${LFC_GEN_MAIN}
SRC += $(LF_SRC_GEN_PATH)/${LFC_GEN_MAIN}

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

# Check if required environment variables exist
Expand Down

0 comments on commit 4a26677

Please sign in to comment.