1
0
mirror of https://github.com/elua/elua.git synced 2025-01-08 20:56:17 +08:00
elua/doc/pt/building_unix.html
2010-01-25 23:43:05 +00:00

37 lines
2.0 KiB
HTML

$$HEADER$$
<h3>Building eLua in Linux</h3>
<p>Building <b>eLua</b> 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 <b>eLua</b>:</p>
<ul>
<li><b>a toolchain</b>: check <a href="toolchains.html">the toolchains page</a> 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 <b>eLua</b>
for building properly on your machine.</li>
<li><b>Python</b> : it should be already installed. If it's not, use
apt-get to install it:
<pre><code>$ sudo apt-get install python</code></pre>
</li>
<li><b>scons</b> - <b>eLua</b> uses scons instead of make
and makefiles, because we find scons much more "natural" and easier to
use than make. To install it:
<pre><code>$ sudo apt-get install scons</code></pre>
</li>
<li>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.
</li>
<li>if you're building for the i386 platform, you'll also need
"nasm":
<pre><code>$ sudo apt-get install nasm</code></pre>
</li>
<li><b>gcc</b>: if you want to use the ROMFS precompile feature (see <a href="arch_romfs.html#mode">here</a> for details) you need to build an image of the <b>eLua</b> 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:
<pre><code>sudo apt-get install build-essential</code></pre>
Then build the <b>eLua</b> cross compiler by executing this command:
<pre><code>scons -f cross-lua.py</code></pre>
</li>
</ul>
<p>After you setup your build environment as described above, follow <a href="building.html#configuring">this tutorial</a> to build your <b>eLua</b> image.</p>
$$FOOTER$$