From e61bf405428f6bfd0965acd6b008e99e0ca6eb3f Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Fri, 6 Mar 2026 12:16:28 +0000 Subject: [PATCH] make: define PLUGIN when preprocessing plugin linker scripts This matches the behavior of codecs, which define CODEC, and is needed to get an accurate definition of USE_IRAM out of config.h. Change-Id: I84855ba88d01495bb63c609b3e4d67922b908440 --- apps/plugins/chessbox/chessbox.make | 2 +- apps/plugins/goban/goban.make | 2 +- apps/plugins/imageviewer/imageviewer.make | 2 +- apps/plugins/lua/lua.make | 2 +- apps/plugins/pictureflow/pictureflow.make | 2 +- apps/plugins/plugins.make | 4 ++-- apps/plugins/rockboy/rockboy.make | 2 +- apps/plugins/sdl/sdl.make | 6 +++--- apps/plugins/zxbox/zxbox.make | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/plugins/chessbox/chessbox.make b/apps/plugins/chessbox/chessbox.make index 77a038febc..c4b1b495e1 100644 --- a/apps/plugins/chessbox/chessbox.make +++ b/apps/plugins/chessbox/chessbox.make @@ -31,7 +31,7 @@ $(CHESSBOX_OBJDIR)/chessbox.rock: $(CHESSBOX_OBJ) $(CHESSBOX_OBJDIR)/chessbox.refmap: $(CHESSBOX_OBJ) $(CHESSBOX_OUTLDS): $(PLUGIN_LDS) $(CHESSBOX_OBJDIR)/chessbox.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(CHESSBOX_OBJDIR)/chessbox.refmap)) $(CHESSBOX_OBJDIR)/chessbox.ovl: $(CHESSBOX_OBJ) $(CHESSBOX_OUTLDS) diff --git a/apps/plugins/goban/goban.make b/apps/plugins/goban/goban.make index ae221e8840..160cfdf1ad 100644 --- a/apps/plugins/goban/goban.make +++ b/apps/plugins/goban/goban.make @@ -28,7 +28,7 @@ $(GOBAN_BUILDDIR)/goban.rock: $(GOBAN_OBJ) $(GOBAN_BUILDDIR)/goban.refmap: $(GOBAN_OBJ) $(GOBAN_OUTLDS): $(PLUGIN_LDS) $(GOBAN_BUILDDIR)/goban.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(GOBAN_BUILDDIR)/goban.refmap)) $(GOBAN_BUILDDIR)/goban.ovl: $(GOBAN_OBJ) $(GOBAN_OUTLDS) diff --git a/apps/plugins/imageviewer/imageviewer.make b/apps/plugins/imageviewer/imageviewer.make index 25701fc6d2..37b2e6ff8d 100644 --- a/apps/plugins/imageviewer/imageviewer.make +++ b/apps/plugins/imageviewer/imageviewer.make @@ -50,5 +50,5 @@ $(IMGVBUILDDIR)/%.refmap: $(APPSDIR)/plugin.h $(IMGVSRCDIR)/imageviewer.h $(PLUG -lgcc $(IMGDECLDFLAGS) $(IMGVBUILDDIR)/%.link: $(PLUGIN_LDS) $(IMGVBUILDDIR)/%.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DIMGVDECODER_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DIMGVDECODER_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(IMGVBUILDDIR)/$*.refmap)) diff --git a/apps/plugins/lua/lua.make b/apps/plugins/lua/lua.make index ec8a7e8b38..7ca05c15d1 100644 --- a/apps/plugins/lua/lua.make +++ b/apps/plugins/lua/lua.make @@ -65,7 +65,7 @@ $(LUA_BUILDDIR)/%.lua: $(LUA_INCLUDEDIR)/%.lua | $(LUA_BUILDDIR) $(LUA_BUILDDIR)/lua.refmap: $(LUA_OBJ) $(TLSFLIB) $(LUA_OUTLDS): $(PLUGIN_LDS) $(LUA_BUILDDIR)/lua.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(LUA_BUILDDIR)/lua.refmap)) $(LUA_BUILDDIR)/lua.ovl: $(LUA_OBJ) $(TLSFLIB) $(LUA_OUTLDS) diff --git a/apps/plugins/pictureflow/pictureflow.make b/apps/plugins/pictureflow/pictureflow.make index 7436af2433..eb19eaacf0 100644 --- a/apps/plugins/pictureflow/pictureflow.make +++ b/apps/plugins/pictureflow/pictureflow.make @@ -29,7 +29,7 @@ $(PICTUREFLOW_OBJDIR)/pictureflow.rock: $(PICTUREFLOW_OBJ) $(PICTUREFLOW_OBJDIR)/pictureflow.refmap: $(PICTUREFLOW_OBJ) $(PICTUREFLOW_OUTLDS): $(PLUGIN_LDS) $(PICTUREFLOW_OBJDIR)/pictureflow.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(PICTUREFLOW_OBJDIR)/pictureflow.refmap)) $(PICTUREFLOW_OBJDIR)/pictureflow.ovl: $(PICTUREFLOW_OBJ) $(PICTUREFLOW_OUTLDS) diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make index 216985340a..6132a177f4 100644 --- a/apps/plugins/plugins.make +++ b/apps/plugins/plugins.make @@ -95,12 +95,12 @@ $(PLUGINLIB): $(PLUGINLIB_OBJ) $(PLUGINLINK_LDS): $(PLUGIN_LDS) $(CONFIGFILE) $(call PRINTS,PP $(@F)) $(shell mkdir -p $(dir $@)) - $(call preprocess2file,$<,$@,) + $(call preprocess2file,$<,$@,-DPLUGIN) $(OVERLAYREF_LDS): $(PLUGIN_LDS) $(call PRINTS,PP $(@F)) $(shell mkdir -p $(dir $@)) - $(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=0) + $(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=0) $(BUILDDIR)/credits.raw credits.raw: $(DOCSDIR)/CREDITS $(call PRINTS,Create credits.raw)perl $(APPSDIR)/plugins/credits.pl < $< > $(BUILDDIR)/$(@F) diff --git a/apps/plugins/rockboy/rockboy.make b/apps/plugins/rockboy/rockboy.make index 8725604933..ba8ffe2390 100644 --- a/apps/plugins/rockboy/rockboy.make +++ b/apps/plugins/rockboy/rockboy.make @@ -29,7 +29,7 @@ $(ROCKBOY_OBJDIR)/rockboy.rock: $(ROCKBOY_OBJ) $(ROCKBOY_OBJDIR)/rockboy.refmap: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS): $(PLUGIN_LDS) $(ROCKBOY_OBJDIR)/rockboy.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(ROCKBOY_OBJDIR)/rockboy.refmap)) $(ROCKBOY_OBJDIR)/rockboy.ovl: $(ROCKBOY_OBJ) $(ROCKBOY_OUTLDS) diff --git a/apps/plugins/sdl/sdl.make b/apps/plugins/sdl/sdl.make index 7234656268..37b98fa2ac 100644 --- a/apps/plugins/sdl/sdl.make +++ b/apps/plugins/sdl/sdl.make @@ -70,7 +70,7 @@ $(SDL_OBJDIR)/duke3d.rock: $(SDL_OBJ) $(DUKE3D_OBJ) $(TLSFLIB) $(SDL_OBJDIR)/duke3d.refmap: $(SDL_OBJ) $(DUKE3D_OBJ) $(TLSFLIB) $(DUKE3D_OUTLDS): $(PLUGIN_LDS) $(SDL_OBJDIR)/duke3d.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(SDL_OBJDIR)/duke3d.refmap)) $(SDL_OBJDIR)/duke3d.ovl: $(SDL_OBJ) $(DUKE3D_OBJ) $(TLSFLIB) $(DUKE3D_OUTLDS) @@ -87,7 +87,7 @@ $(SDL_OBJDIR)/wolf3d.rock: $(SDL_OBJ) $(WOLF3D_OBJ) $(TLSFLIB) $(SDL_OBJDIR)/wolf3d.refmap: $(SDL_OBJ) $(WOLF3D_OBJ) $(TLSFLIB) $(WOLF3D_OUTLDS): $(PLUGIN_LDS) $(SDL_OBJDIR)/wolf3d.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(SDL_OBJDIR)/wolf3d.refmap)) $(SDL_OBJDIR)/wolf3d.ovl: $(SDL_OBJ) $(WOLF3D_OBJ) $(TLSFLIB) $(WOLF3D_OUTLDS) @@ -105,7 +105,7 @@ $(SDL_OBJDIR)/quake.rock: $(SDL_OBJ) $(QUAKE_OBJ) $(TLSFLIB) $(SDL_OBJDIR)/quake.refmap: $(SDL_OBJ) $(QUAKE_OBJ) $(TLSFLIB) $(QUAKE_OUTLDS): $(PLUGIN_LDS) $(SDL_OBJDIR)/quake.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(SDL_OBJDIR)/quake.refmap)) $(SDL_OBJDIR)/quake.ovl: $(SDL_OBJ) $(QUAKE_OBJ) $(TLSFLIB) $(QUAKE_OUTLDS) diff --git a/apps/plugins/zxbox/zxbox.make b/apps/plugins/zxbox/zxbox.make index 1ee64d6fb5..53c7232405 100644 --- a/apps/plugins/zxbox/zxbox.make +++ b/apps/plugins/zxbox/zxbox.make @@ -37,7 +37,7 @@ $(ZXBOX_OBJDIR)/zxbox.rock: $(ZXBOX_OBJ) $(ZXBOX_OBJDIR)/zxbox.refmap: $(ZXBOX_OBJ) $(ZXBOX_OUTLDS): $(PLUGIN_LDS) $(ZXBOX_OBJDIR)/zxbox.refmap - $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \ + $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DPLUGIN -DOVERLAY_OFFSET=$(shell \ $(TOOLSDIR)/ovl_offset.pl $(ZXBOX_OBJDIR)/zxbox.refmap)) $(ZXBOX_OBJDIR)/zxbox.ovl: $(ZXBOX_OBJ) $(ZXBOX_OUTLDS)