aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword2')
-rw-r--r--engines/sword2/module.mk2
-rw-r--r--engines/sword2/sword2.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/engines/sword2/module.mk b/engines/sword2/module.mk
index 3b21023fa8..c675b9561e 100644
--- a/engines/sword2/module.mk
+++ b/engines/sword2/module.mk
@@ -34,7 +34,7 @@ MODULE_OBJS := \
walker.o
# This module can be built as a plugin
-ifdef BUILD_PLUGINS
+ifeq ($(ENABLE_SWORD2), DYNAMIC_PLUGIN)
PLUGIN := 1
endif
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index d86c5b6c9e..0601d11791 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -180,7 +180,11 @@ PluginError Sword2MetaEngine::createInstance(OSystem *syst, Engine **engine) con
return kNoGameDataFoundError;
}
-REGISTER_PLUGIN(SWORD2, PLUGIN_TYPE_ENGINE, Sword2MetaEngine);
+#if PLUGIN_ENABLED_DYNAMIC(SWORD2)
+ REGISTER_PLUGIN_DYNAMIC(SWORD2, PLUGIN_TYPE_ENGINE, Sword2MetaEngine);
+#else
+ REGISTER_PLUGIN_STATIC(SWORD2, PLUGIN_TYPE_ENGINE, Sword2MetaEngine);
+#endif
namespace Sword2 {