mirror of
https://github.com/ProjectDreamland/area51.git
synced 2024-11-01 03:01:49 +01:00
80 lines
3.2 KiB
Text
80 lines
3.2 KiB
Text
This is Lua 5.0.
|
|
|
|
* Installation
|
|
------------
|
|
Building Lua on a Unix system should be very easy:
|
|
|
|
1. Read "config" and edit it to suit your platform and needs.
|
|
We strongly recommend that you enable support for dynamic loading,
|
|
if your platform allows it.
|
|
2. Do "make".
|
|
3. If you want to install Lua in an "official" place in your system,
|
|
then do "make install". The official place and the way to install
|
|
files are defined in "config". You may have to be root to do this.
|
|
|
|
See below for instructions for Windows and other systems.
|
|
|
|
* What you get
|
|
------------
|
|
If "make" succeeds, you get:
|
|
* an interpreter in ./bin/lua and a compiler in ./bin/luac;
|
|
* libraries in ./lib;
|
|
* include files in ./include.
|
|
These are the only directories you need for development.
|
|
|
|
There are man pages for lua and luac, in both nroff and html; a reference
|
|
manual in html in ./doc, some sample code in ./test, and some useful stuff
|
|
in ./etc. You don't need these directories for development.
|
|
|
|
See also the README files in the various subdirectories.
|
|
A convenient starting point is ./doc/readme.html.
|
|
|
|
* If you have problems (and solutions!)
|
|
-------------------------------------
|
|
If "make" fails, please let us know (lua@tecgraf.puc-rio.br).
|
|
If you make changes to "config" or to the Makefiles, please send them to us.
|
|
|
|
* Shared libraries
|
|
----------------
|
|
If you are running Linux, do "make so" after "make" succeeds.
|
|
This will create shared libraries in ./lib.
|
|
To install those shared libraries in an official place, do "make soinstall".
|
|
|
|
If you want the interpreter and the compiler to use shared libraries,
|
|
then do "make sobin" too. You may want to do this before "make install".
|
|
|
|
If you only want the shared libraries, you may want to add -fPIC to MYCFLAGS
|
|
in "config". Also, you may need to run "ldconfig" as root.
|
|
|
|
You may need to include ./lib in the LD_LIBRARY_PATH environment variable
|
|
to link programs that use the shared libraries if you don't put them in the
|
|
official places with "make install". (You may need to use the full path.)
|
|
|
|
Building shared libraries in other systems is similar but details differ;
|
|
you may need to fix a few details in the top-level Makefile.
|
|
|
|
* Installation on Windows and other systems
|
|
-----------------------------------------------------
|
|
The instructions for building Lua on other systems machine depend on the
|
|
particular compiler you are using. The simplest way is to create a folder
|
|
with all .c and .h files, and then create projects for the core library,
|
|
the standard library, the interpreter, and the compiler, as follows:
|
|
|
|
core lib: lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c
|
|
lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c
|
|
ltable.c ltests.c ltm.c lundump.c lvm.c lzio.c
|
|
|
|
standard lib: lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c ltablib.c
|
|
lstrlib.c loadlib.c
|
|
|
|
interpreter: core lib, standard lib, lua.c
|
|
|
|
compiler: core lib, standard lib, luac.c print.c
|
|
and also lopcodes.c (with LUA_OPNAMES defined) from core.
|
|
|
|
Of course, to use Lua as a library, you'll have to know how to create
|
|
and use libraries with your compiler.
|
|
|
|
Also, read "config" to see what can be customized at compilation time.
|
|
|
|
(end of INSTALL)
|