summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct2
-rw-r--r--drivers/etc1/SCsub3
-rw-r--r--drivers/register_driver_types.cpp3
3 files changed, 7 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 50acd3884d..42c803e81e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -308,6 +308,8 @@ if selected_platform in platform_list:
if (env['colored']=='yes'):
methods.colored(sys,env)
+ if (env['etc1']=='yes'):
+ env.Append(CPPFLAGS=['-DETC1_ENABLED'])
Export('env')
diff --git a/drivers/etc1/SCsub b/drivers/etc1/SCsub
index 152dc3f4d0..251c3ffb86 100644
--- a/drivers/etc1/SCsub
+++ b/drivers/etc1/SCsub
@@ -6,7 +6,8 @@ etc_sources = [
"etc1/rg_etc1.cpp"
]
-env.drivers_sources+=etc_sources
+if (env["etc1"] != "no"):
+ env.drivers_sources+=etc_sources
#env.add_source_files(env.drivers_sources, etc_sources)
diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp
index e4bb1a343a..e730171fbb 100644
--- a/drivers/register_driver_types.cpp
+++ b/drivers/register_driver_types.cpp
@@ -222,7 +222,10 @@ void register_driver_types() {
#endif
#endif
+#ifdef ETC1_ENABLED
_register_etc1_compress_func();
+#endif
+
initialize_chibi();
}