Imported from ../lua-2.4.tar.gz.
[lua.git] / src / Makefile
blob843220dce409297aeeabd2c603fbeafd5ffcf31b
1 # makefile for lua distribution (main library)
3 LUA= ..
5 include $(LUA)/config
7 OBJS= fallback.o\
8 func.o\
9 hash.o\
10 inout.o\
11 lex.o\
12 mem.o\
13 opcode.o\
14 parser.o\
15 table.o\
16 tree.o\
17 undump.o
19 SRCS= fallback.c\
20 fallback.h\
21 func.c\
22 func.h\
23 hash.c\
24 hash.h\
25 inout.c\
26 inout.h\
27 lex.c\
28 lex.h\
29 mem.c\
30 mem.h\
31 opcode.c\
32 opcode.h\
33 parser.c\
34 parser.h\
35 table.c\
36 table.h\
37 tree.c\
38 tree.h\
39 types.h\
40 undump.c\
41 undump.h\
42 lua.stx
44 SLIB= $(LIB)/liblua.a
46 all: $(SLIB)
48 $(SLIB): $(OBJS)
49 ar rcuv $@ $(OBJS)
50 ranlib $@
52 clean:
53 rm -f $(OBJS) $(SLIB)
55 co:
56 co -f -M $(SRCS)
58 parser:
59 yacc -d lua.stx
60 rm -f parser.c parser.h
61 sed -e 's/yy/luaY_/g' y.tab.c > parser.c
62 sed -e 's/yy/luaY_/g' y.tab.h > parser.h
63 rm y.tab.c y.tab.h
65 klean: clean
66 rm -f $(SRCS)