summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lua.make
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-21 19:01:41 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-21 19:01:41 +0000
commitcf87597226f5d6b269f1f2c4d6f402aa1eccb852 (patch)
tree4ba1f3ae53b3bd9cae0e2c6c4dd57836b43a5ece /apps/plugins/lua/lua.make
parentc483efadc63eaed35b5fb5e4e02c2282daf32470 (diff)
downloadrockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.tar.gz
rockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.zip
Commit FS#9174: Lua scripting language by Dan Everton
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21020 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lua/lua.make')
-rw-r--r--apps/plugins/lua/lua.make46
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/plugins/lua/lua.make b/apps/plugins/lua/lua.make
new file mode 100644
index 0000000000..6688f2d3d8
--- /dev/null
+++ b/apps/plugins/lua/lua.make
@@ -0,0 +1,46 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7# $Id$
8#
9
10LUA_SRCDIR := $(APPSDIR)/plugins/lua
11LUA_BUILDDIR := $(BUILDDIR)/apps/plugins/lua
12
13LUA_SRC := $(call preprocess, $(LUA_SRCDIR)/SOURCES)
14LUA_OBJ := $(call c2obj, $(LUA_SRC))
15
16OTHER_SRC += $(LUA_SRC)
17
18ifndef SIMVER
19ifneq (,$(strip $(foreach tgt,RECORDER ONDIO,$(findstring $(tgt),$(TARGET)))))
20 ### lowmem targets
21 ROCKS += $(LUA_BUILDDIR)/lua.ovl
22 LUA_OUTLDS = $(LUA_BUILDDIR)/lua.link
23 LUA_OVLFLAGS = -T$(LUA_OUTLDS) -Wl,--gc-sections -Wl,-Map,$(basename $@).map
24else
25 ### all other targets
26 ROCKS += $(LUA_BUILDDIR)/lua.rock
27endif
28else
29 ### simulator
30 ROCKS += $(LUA_BUILDDIR)/lua.rock
31endif
32
33$(LUA_BUILDDIR)/lua.rock: $(LUA_OBJ)
34
35$(LUA_BUILDDIR)/lua.refmap: $(LUA_OBJ)
36
37$(LUA_OUTLDS): $(PLUGIN_LDS) $(LUA_BUILDDIR)/lua.refmap
38 $(call PRINTS,PP $(@F))$(call preprocess2file,$<,$@,-DOVERLAY_OFFSET=$(shell \
39 $(TOOLSDIR)/ovl_offset.pl $(LUA_BUILDDIR)/lua.refmap))
40
41$(LUA_BUILDDIR)/lua.ovl: $(LUA_OBJ) $(LUA_OUTLDS)
42 $(SILENT)$(CC) $(PLUGINFLAGS) -o $(basename $@).elf \
43 $(filter %.o, $^) \
44 $(filter %.a, $+) \
45 -lgcc $(LUA_OVLFLAGS)
46 $(call PRINTS,LD $(@F))$(OC) -O binary $(basename $@).elf $@