--- a/apps/plugins/plugins.make
+++ b/apps/plugins/plugins.make
@@ -8,7 +8,14 @@
#

# single-file plugins:
+is_app_build =
ifdef APP_TYPE
+ifneq ($(APP_TYPE),sdl-sim)
+ is_app_build = yes
+endif
+endif
+
+ifdef is_app_build
PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES.app_build)
else
PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES)
@@ -40,7 +47,7 @@ endif
OTHER_SRC += $(ROOTDIR)/apps/plugins/plugin_crt0.c
PLUGIN_CRT0 := $(BUILDDIR)/apps/plugins/plugin_crt0.o
# multifile plugins (subdirs):
-ifdef APP_TYPE
+ifdef is_app_build
PLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS.app_build)
else
PLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS)