diff options
author | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1993-12-17 16:59:10 -0200 |
---|---|---|
committer | Waldemar Celes <celes@tecgraf.puc-rio.br> | 1993-12-17 16:59:10 -0200 |
commit | 2f5ff96e8fb70c5cf1589c788af34f0b2e73d1ae (patch) | |
tree | c7c2071bee9e46a98b34234201cac4f2cc0c5a1c | |
parent | eca011188687bfacdfff221d8db190d817570599 (diff) | |
download | lua-2f5ff96e8fb70c5cf1589c788af34f0b2e73d1ae.tar.gz lua-2f5ff96e8fb70c5cf1589c788af34f0b2e73d1ae.tar.bz2 lua-2f5ff96e8fb70c5cf1589c788af34f0b2e73d1ae.zip |
LUA makefile
-rw-r--r-- | makefile | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/makefile b/makefile new file mode 100644 index 00000000..6f785e79 --- /dev/null +++ b/makefile | |||
@@ -0,0 +1,52 @@ | |||
1 | # $Id: $ | ||
2 | # Compilation parameters | ||
3 | CC = gcc | ||
4 | CFLAGS = -I/usr/5include -Wall -DMAXCODE=4096 -DMAXCONSTANT=1024 -DMAXSYMBOL=1024 | ||
5 | |||
6 | AR = ar | ||
7 | ARFLAGS = rvl | ||
8 | |||
9 | # Aplication modules | ||
10 | LUAMOD = \ | ||
11 | lex.yy \ | ||
12 | y.tab \ | ||
13 | opcode \ | ||
14 | hash \ | ||
15 | table \ | ||
16 | inout | ||
17 | |||
18 | LIBMOD = \ | ||
19 | iolib \ | ||
20 | strlib \ | ||
21 | mathlib | ||
22 | |||
23 | LUAOBJS = $(LUAMOD:%=%.o) | ||
24 | |||
25 | LIBOBJS = $(LIBMOD:%=%.o) | ||
26 | |||
27 | lua : lua.o lua.a lualib.a | ||
28 | $(CC) $(CFLAGS) -o $@ lua.c lua.a lualib.a -lm | ||
29 | |||
30 | lua.a : lex.yy.c y.tab.c $(LUAOBJS) | ||
31 | $(AR) $(ARFLAGS) $@ $? | ||
32 | ranlib lua.a | ||
33 | |||
34 | lualib.a : $(LIBOBJS) | ||
35 | $(AR) $(ARFLAGS) $@ $? | ||
36 | ranlib $@ | ||
37 | |||
38 | .KEEP_STATE: | ||
39 | |||
40 | liblua.so.1.0 : lua.o | ||
41 | ld -o liblua.so.1.0 $(LUAOBJS) | ||
42 | |||
43 | %.o : %.c | ||
44 | $(CC) $(CFLAGS) -c -o $@ $< | ||
45 | |||
46 | lex.yy.c : lua.lex | ||
47 | lex lua.lex | ||
48 | |||
49 | y.tab.c : lua.stx | ||
50 | yacc -d lua.stx ; ex y.tab.c <exscript | ||
51 | |||
52 | |||