summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lua/lua.make
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-07-18 08:42:00 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2019-07-18 08:42:00 -0500
commitc9aeb4284e6456b8ca846f2bdfcd8f68d6ecd7b8 (patch)
tree87df9497cf1290d1340f0ab2f77d73cbe4df3f0c /apps/plugins/lua/lua.make
parent47639fb9acb3da7fa44e16ad15b9237191e6c482 (diff)
downloadrockbox-c9aeb4284e6456b8ca846f2bdfcd8f68d6ecd7b8.tar.gz
rockbox-c9aeb4284e6456b8ca846f2bdfcd8f68d6ecd7b8.zip
lua move constants out of binary image
Rockbox constants are auto generated by a perl script like the majority of the plugin functions. Constants are contained in rb_defines.lua, if the file exists it is auto loaded by the lua state for backwards compatibility Frees ~1k Change-Id: I237700576c748f468249e501c839d89effca3f39
Diffstat (limited to 'apps/plugins/lua/lua.make')
-rw-r--r--apps/plugins/lua/lua.make7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/plugins/lua/lua.make b/apps/plugins/lua/lua.make
index b5a0c74633..f54d35bc44 100644
--- a/apps/plugins/lua/lua.make
+++ b/apps/plugins/lua/lua.make
@@ -35,11 +35,16 @@ else
ROCKS += $(LUA_BUILDDIR)/lua.rock
endif
-$(LUA_BUILDDIR)/lua.rock: $(LUA_OBJ) $(TLSFLIB) $(LUA_BUILDDIR)/actions.lua $(LUA_BUILDDIR)/buttons.lua $(LUA_BUILDDIR)/settings.lua $(LUA_BUILDDIR)/rocklib_aux.o $(LUA_INCLUDELIST)
+$(LUA_BUILDDIR)/lua.rock: $(LUA_OBJ) $(TLSFLIB) $(LUA_BUILDDIR)/actions.lua $(LUA_BUILDDIR)/buttons.lua $(LUA_BUILDDIR)/settings.lua $(LUA_BUILDDIR)/rocklib_aux.o $(LUA_BUILDDIR)/rb_defines.lua $(LUA_INCLUDELIST)
$(LUA_BUILDDIR)/actions.lua: $(LUA_OBJ) $(LUA_SRCDIR)/action_helper.pl
$(call PRINTS,GEN $(@F))$(CC) $(PLUGINFLAGS) $(INCLUDES) -E -P $(APPSDIR)/plugins/lib/pluginlib_actions.h | $(LUA_SRCDIR)/action_helper.pl > $(LUA_BUILDDIR)/actions.lua
+$(LUA_BUILDDIR)/rb_defines.lua: $(LUA_OBJ) $(LUA_SRCDIR)/rbdefines_helper.pl
+ $(SILENT)$(CC) $(INCLUDES) -dD -E -P $(TARGET) $(CFLAGS) -include plugin.h - < /dev/null | $(LUA_SRCDIR)/rbdefines_helper.pl | \
+ $(HOSTCC) -fno-builtin $(HOST_INCLUDES) -x c -o $(LUA_BUILDDIR)/rbdefines_helper -
+ $(call PRINTS,GEN $(@F))$(LUA_BUILDDIR)/rbdefines_helper > $(LUA_BUILDDIR)/rb_defines.lua
+
$(LUA_BUILDDIR)/settings.lua: $(LUA_OBJ) $(LUA_SRCDIR)/settings_helper.pl
$(SILENT)$(CC) $(INCLUDES) -E -P $(TARGET) $(CFLAGS) -include plugin.h -include cuesheet.h - < /dev/null | $(LUA_SRCDIR)/settings_helper.pl | \
$(CC) $(INCLUDES) $(TARGET) $(CFLAGS) -S -x c -include config.h -include plugin.h -o $(LUA_BUILDDIR)/settings_helper.s -