1996-05-06 20:59:00 +04:00
|
|
|
# $Id: makefile,v 1.25 1996/05/06 14:38:40 roberto Exp $
|
1995-10-09 21:51:49 +03:00
|
|
|
|
|
|
|
#configuration
|
|
|
|
|
|
|
|
# define (undefine) POPEN if your system (does not) support piped I/O
|
1996-05-03 21:27:03 +04:00
|
|
|
# define (undefine) POSIX if your system is (not) POSIX compliant
|
|
|
|
CONFIG = -DPOPEN -DPOSIX
|
1993-12-17 21:59:10 +03:00
|
|
|
# Compilation parameters
|
|
|
|
CC = gcc
|
1995-10-09 21:51:49 +03:00
|
|
|
CFLAGS = $(CONFIG) -I/usr/5include -Wall -Wmissing-prototypes -Wshadow -ansi -O2
|
1994-11-23 23:15:04 +03:00
|
|
|
|
|
|
|
#CC = acc
|
|
|
|
#CFLAGS = -fast -I/usr/5include
|
1993-12-17 21:59:10 +03:00
|
|
|
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = rvl
|
|
|
|
|
|
|
|
# Aplication modules
|
1995-11-10 20:56:06 +03:00
|
|
|
LUAOBJS = \
|
|
|
|
parser.o \
|
|
|
|
lex.o \
|
|
|
|
opcode.o \
|
|
|
|
hash.o \
|
|
|
|
table.o \
|
|
|
|
inout.o \
|
|
|
|
tree.o \
|
|
|
|
fallback.o \
|
|
|
|
mem.o \
|
1996-03-15 21:22:09 +03:00
|
|
|
func.o \
|
|
|
|
undump.o
|
1995-11-10 20:56:06 +03:00
|
|
|
|
|
|
|
LIBOBJS = \
|
|
|
|
iolib.o \
|
|
|
|
mathlib.o \
|
|
|
|
strlib.o
|
|
|
|
|
1993-12-17 21:59:10 +03:00
|
|
|
|
|
|
|
lua : lua.o lua.a lualib.a
|
1995-10-17 21:16:58 +03:00
|
|
|
$(CC) $(CFLAGS) -o $@ lua.o lua.a lualib.a -lm
|
1993-12-17 21:59:10 +03:00
|
|
|
|
1996-03-05 18:57:53 +03:00
|
|
|
lua.a : $(LUAOBJS)
|
1993-12-17 21:59:10 +03:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
|
|
|
ranlib lua.a
|
|
|
|
|
|
|
|
lualib.a : $(LIBOBJS)
|
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
|
|
|
ranlib $@
|
|
|
|
|
|
|
|
liblua.so.1.0 : lua.o
|
|
|
|
ld -o liblua.so.1.0 $(LUAOBJS)
|
|
|
|
|
1996-05-06 20:59:00 +04:00
|
|
|
#y.tab.c y.tab.h : lua.stx
|
|
|
|
# yacc++ -d lua.stx
|
1993-12-17 21:59:10 +03:00
|
|
|
|
1996-05-06 20:59:00 +04:00
|
|
|
#parser.c : y.tab.c
|
|
|
|
# sed -e 's/yy/luaY_/g' -e 's/malloc\.h/stdlib\.h/g' y.tab.c > parser.c
|
1995-12-21 19:14:04 +03:00
|
|
|
|
1996-05-06 20:59:00 +04:00
|
|
|
#parser.h : y.tab.h
|
|
|
|
# sed -e 's/yy/luaY_/g' y.tab.h > parser.h
|
1993-12-17 21:59:10 +03:00
|
|
|
|
1994-07-20 02:04:51 +04:00
|
|
|
clear :
|
|
|
|
rcsclean
|
|
|
|
rm -f *.o
|
1995-12-21 19:14:04 +03:00
|
|
|
rm -f parser.c parser.h y.tab.c y.tab.h
|
1995-10-17 17:12:45 +03:00
|
|
|
co lua.h lualib.h luadebug.h
|
1994-07-20 02:04:51 +04:00
|
|
|
|
1996-03-15 21:22:09 +03:00
|
|
|
|
1996-05-06 20:59:00 +04:00
|
|
|
#% : RCS/%,v
|
|
|
|
# co $@
|
1994-01-10 22:49:56 +03:00
|
|
|
|
1994-11-23 23:15:04 +03:00
|
|
|
|
1996-05-06 18:38:40 +04:00
|
|
|
fallback.o : fallback.c mem.h fallback.h lua.h opcode.h types.h tree.h func.h \
|
|
|
|
table.h
|
1996-02-07 21:14:38 +03:00
|
|
|
func.o : func.c luadebug.h lua.h table.h tree.h types.h opcode.h func.h mem.h
|
1995-10-09 21:51:49 +03:00
|
|
|
hash.o : hash.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h
|
1996-03-15 21:22:09 +03:00
|
|
|
inout.o : inout.c lex.h opcode.h lua.h types.h tree.h func.h inout.h table.h \
|
|
|
|
mem.h
|
1996-02-07 21:14:38 +03:00
|
|
|
iolib.o : iolib.c lua.h luadebug.h lualib.h
|
1996-02-13 20:30:39 +03:00
|
|
|
lex.o : lex.c mem.h tree.h types.h table.h opcode.h lua.h func.h lex.h inout.h \
|
1996-03-15 21:22:09 +03:00
|
|
|
luadebug.h parser.h
|
1994-11-23 23:15:04 +03:00
|
|
|
lua.o : lua.c lua.h lualib.h
|
|
|
|
mathlib.o : mathlib.c lualib.h lua.h
|
1996-02-07 21:14:38 +03:00
|
|
|
mem.o : mem.c mem.h lua.h table.h tree.h types.h opcode.h func.h
|
|
|
|
opcode.o : opcode.c luadebug.h lua.h mem.h opcode.h types.h tree.h func.h hash.h \
|
1996-03-15 21:22:09 +03:00
|
|
|
inout.h table.h fallback.h undump.h
|
1996-02-13 20:30:39 +03:00
|
|
|
parser.o : parser.c luadebug.h lua.h mem.h lex.h opcode.h types.h tree.h func.h \
|
|
|
|
hash.h inout.h table.h
|
1995-10-09 21:51:49 +03:00
|
|
|
strlib.o : strlib.c lua.h lualib.h
|
|
|
|
table.o : table.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h \
|
1996-02-07 21:14:38 +03:00
|
|
|
inout.h fallback.h luadebug.h
|
1996-03-15 21:22:09 +03:00
|
|
|
tree.o : tree.c mem.h lua.h tree.h types.h lex.h hash.h opcode.h func.h table.h
|
|
|
|
undump.o : undump.c opcode.h lua.h types.h tree.h func.h mem.h table.h undump.h
|