If you do not have the GCC compiler you can download it from
http://www.riscos.info/index.php/GCC
or get it as a package using Packman. For the list of packages see
http://www.riscos.info/packages/ABCIndex.html
You will also need from the above URL the packages:
In the src directory of your Lua sources create a directory called o for object files. I also add a TaskObey file called Go! containing
dir <Obey$dir> maketo be double-clicked to fire off the compiler. But before you do that you need to edit src.makefile and make an adjustment to the file src.h.luaconf to override its Unix configuration values with RISC OS ones.
In src.Makefile change the following lines:
PLAT= none --> PLAT= generic
SYSLIBS= --> SYSLIBS= -ldl
MYCFLAGS= --> MYCFLAGS= -DRISCOS
SYSCFLAGS= --> SYSCFLAGS= -mfpu=vfp
LUA_T= lua
LUAC_T= luac