1
0
mirror of https://github.com/elua/elua.git synced 2025-01-25 01:02:54 +08:00
elua/doc/en/building_unix.txt
Bogdan Marinescu 958f357257 Working on the new build system
- Deleted the Python build files
- Main documentation updated with information about how to use build_elua
- CSS updated to provide a bit of free space at the top of <h2> headings.
- Added rpc-lua.lua
- Fixed cross-compilation errors

References to scons still exist in the docs, they'll have to be removed.
2013-05-19 15:57:18 +03:00

58 lines
2.5 KiB
Plaintext

// $$HEADER$$
Building eLua in Linux
----------------------
IMPORTANT: Starting with eLua 0.10, a new Lua-based build system replaces the previous Python based (scons) build system. You'll need to update
your machine environment accordingly, as per the instructions below.
Building eLua in Linux is fairly easy. This tutorial assumes that Ubuntu is used for building, however any distro should be fine, you just need to
convert the "apt-get" calls to your distro's package manager equivalent. You need a few packages installed to build eLua:
* *a toolchain*: check link:toolchains.html[the toolchains page] for toolchain instructions. Please note that even if you already have a compiled toolchain, the differences in the Newlib configure flags (mainly the --disable-newlib-supplied-syscalls flags) might prevent eLua for building properly on your machine.
* *Lua*: it should be already installed. If it's not, use apt-get to install it:
+
------------------------------
$ sudo apt-get install lua5.1
------------------------------
* *luarocks*: a simple package manager for Lua. Again, use apt-get to install it:
+
-------------------------------
$ sudo apt-get install luarocks
-------------------------------
* *luafilesystem, lpack, md5* - various Lua modules needed by the builder. Use luarocks to install them:
+
-------------------------------------
$ sudo luarocks install luafilesystem
$ sudo luarocks install lpack
$ sudo luarocks install md5
-------------------------------------
* your toolchain's "bin" directory (this is generally something like /usr/local/cross-arm/bin, where /usr/local/cross-arm is the directory in which you installed your toolchain) must be in $PATH.
* if you're building for the i386 platform, you'll also need "nasm":
+
---------------------------
$ sudo apt-get install nasm
---------------------------
* *gcc*: if you want to use the ROMFS precompile feature (see link:arch_romfs.html#mode[here] for details) you need to build an image of the eLua cross compiler, and you need an i386 toolchain for this. It should be already installed, but if you want to be on the safe side do this:
+
------------------------------------
sudo apt-get install build-essential
------------------------------------
+
Then build the eLua cross compiler by executing this command:
+
-----------------
lua cross-lua.lua
-----------------
After you setup your build environment as described above, follow link:building.html#configuring[this tutorial] to build your eLua image.
// $$FOOTER$$