summaryrefslogtreecommitdiff
path: root/INSTALL
blob: 5a349d7a5a52fa99b3957ffef9ec6c1386eac4f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
* Installation

  Building Lua on a Unix system should be very easy:

	1. Edit "config" to suit your platform, if at all necessary
	2. Then, type "make"

  See below for instructions for Windows and Macintosh.

* What you get

  If make succeeds, you get:
	* an interpreter and a compiler in ./bin;
	* libraries in ./lib;
	* include files in ./include.
  These are the only directories you need for development.

  There is a reference manual in html in ./doc, and sample code in ./test.
  You don't need these directories for development.

* If you have problems (and solutions!)

  If "make" fails, please let us know (lua@tecgraf.puc-rio.br).
  If you make changes to "config", please send them to us.

* Shared libraries

  If you are running SunOs 4.x, type the following after "make" succeeds:
	ld -o lib/liblua.so.3.0 src/*.o
	ld -o lib/liblualib.so.3.0 clients/lib/*.o

  For AIX, the OpenGL clone Mesa includes a script for making shared libraries.
  For other systems, please tell us how!

* Installation on Windows or Macintosh
  
  The instructions for building Lua on a Mac or Windows machine depend on
  the particular compiler you are using.
  The simplest way is to create a folder with all .c and .h files.
  Then create projects for the basic library, the standard library,
  the interpreter and the compiler, as follows:

  basic lib:	auxlib.c fallback.c func.c hash.c inout.c lex.c luamem.c
		opcode.c parser.c table.c tree.c undump.c zio.c

  standard lib:	iolib.c mathlib.c strlib.c

  interpreter:	basic lib, standard lib, lua.c

  compiler:	basic lib, dump.c luac.c print.c

  Of course, to use Lua as a library, you'll have to know how to create
  libraries and use with your compiler.