Imported from ../lua-4.0.1.tar.gz.
[lua.git] / INSTALL
blobe31eefad29afb1ca11c581bae014e5becdbf8e22
1 This is Lua 4.0.
3 * Installation
4   ------------
5   Building Lua on a Unix system should be very easy:
7         1. Edit "config" to suit your platform, if at all necessary.
8         2. Do "make".
9         3. If you want to install Lua in an "official" place in your system,
10            then do "make install". The official place and the way to install
11            files are defined in "config". You may have to be root to do this.
13   See below for instructions for Windows and Macintosh.
15 * What you get
16   ------------
17   If "make" succeeds, you get:
18         * an interpreter in ./bin/lua and a compiler in ./bin/luac;
19         * libraries in ./lib;
20         * include files in ./include.
21   These are the only directories you need for development.
23   There man pages for lua and luac in both nroff and html, and a reference
24   manual in html in ./doc, some sample code in ./test, and some useful stuff
25   in ./etc. You don't need these directories for development.
27   See also the README files in the various subdirectories.
28   A convenient starting point is ./doc/readme.html.
30 * If you have problems (and solutions!)
31   -------------------------------------
32   If "make" fails, please let us know (lua@tecgraf.puc-rio.br).
33   If you make changes to "config" or to the Makefiles, please send them to us.
35 * Shared libraries
36   ----------------
37   If you are running Linux, do "make so" after "make" succeeds.
38   This will create shared libraries in ./lib. It's probably better to
39   build shared libraries before "make install".
41   If you want the interpreter and the compiler to use shared libraries,
42   then do "make sobin" too.
44   You may need to include lib/ in the LD_LIBRAY_PATH environment variable
45   to link programs that use the shared libraries if you don't put them in
46   the "official" places with "make install".
48   Building shared libraries in other systems is similar but details differ;
49   you may need to fix a few details in the top-level Makefile.
51 * Installation on Windows or Macintosh
52   ------------------------------------
53   The instructions for building Lua on a Mac or Windows machine depend on
54   the particular compiler you are using.
55   The simplest way is to create a folder with all .c and .h files.
56   Then create projects for the core library, the standard library,
57   the interpreter, and the compiler, as follows:
59   core lib:     lapi.c lcode.c ldebug.c ldo.c lfunc.c lgc.c llex.c lmem.c
60                 lobject.c lparser.c lstate.c lstring.c ltable.c ltests.c
61                 ltm.c lundump.c lvm.c lzio.c
63   standard lib: lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c lstrlib.c
65   interpreter:  core lib, standard lib, lua.c
67   compiler:     core lib, dump.c luac.c opt.c print.c stubs.c
69   Of course, to use Lua as a library, you'll have to know how to create
70   and use libraries with your compiler.
72 (end of INSTALL)