1997-07-31 13:45:25 -07:00
|
|
|
# $Id: makefile,v 1.37 1997/07/01 19:32:41 roberto Exp roberto $
|
1995-10-09 11:51:49 -07:00
|
|
|
|
|
|
|
#configuration
|
|
|
|
|
|
|
|
# define (undefine) POPEN if your system (does not) support piped I/O
|
1997-07-01 12:32:41 -07:00
|
|
|
#
|
1996-11-06 12:48:03 -08:00
|
|
|
# define (undefine) _POSIX_SOURCE if your system is (not) POSIX compliant
|
1997-07-01 12:32:41 -07:00
|
|
|
#
|
|
|
|
# define (undefine) OLD_ANSI if your system does NOT have some new ANSI
|
|
|
|
# facilities ("strerror" and "locale.h"). Although they are ANSI,
|
|
|
|
# SunOS does not comply; so, add "-DOLD_ANSI" on SunOS
|
|
|
|
#
|
1997-06-23 11:27:53 -07:00
|
|
|
# define LUA_COMPAT2_5=0 if yous system does not need to be compatible with
|
|
|
|
# version 2.5 (or older)
|
1997-07-01 12:32:41 -07:00
|
|
|
|
1996-11-06 12:48:03 -08:00
|
|
|
CONFIG = -DPOPEN -D_POSIX_SOURCE
|
1997-07-01 12:32:41 -07:00
|
|
|
|
|
|
|
|
1993-12-17 10:59:10 -08:00
|
|
|
# Compilation parameters
|
|
|
|
CC = gcc
|
1997-03-31 12:58:42 -08:00
|
|
|
CWARNS = -Wall -Wmissing-prototypes -Wshadow -pedantic -Wpointer-arith -Wcast-align -Waggregate-return
|
1997-07-01 12:32:41 -07:00
|
|
|
CFLAGS = $(CONFIG) $(CWARNS) -ansi -O2
|
1994-11-23 12:15:04 -08:00
|
|
|
|
|
|
|
#CC = acc
|
|
|
|
#CFLAGS = -fast -I/usr/5include
|
1993-12-17 10:59:10 -08:00
|
|
|
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = rvl
|
|
|
|
|
1996-11-06 12:48:03 -08:00
|
|
|
|
1993-12-17 10:59:10 -08:00
|
|
|
# Aplication modules
|
1995-11-10 09:56:06 -08:00
|
|
|
LUAOBJS = \
|
|
|
|
parser.o \
|
|
|
|
lex.o \
|
|
|
|
opcode.o \
|
|
|
|
hash.o \
|
|
|
|
table.o \
|
|
|
|
inout.o \
|
|
|
|
tree.o \
|
|
|
|
fallback.o \
|
1997-03-31 06:19:01 -08:00
|
|
|
luamem.o \
|
1996-03-15 10:22:09 -08:00
|
|
|
func.o \
|
1997-03-17 09:02:29 -08:00
|
|
|
undump.o \
|
1997-06-16 09:50:22 -07:00
|
|
|
auxlib.o \
|
|
|
|
zio.o
|
1995-11-10 09:56:06 -08:00
|
|
|
|
|
|
|
LIBOBJS = \
|
|
|
|
iolib.o \
|
|
|
|
mathlib.o \
|
|
|
|
strlib.o
|
|
|
|
|
1993-12-17 10:59:10 -08:00
|
|
|
|
1996-11-06 12:48:03 -08:00
|
|
|
lua : lua.o liblua.a liblualib.a
|
|
|
|
$(CC) $(CFLAGS) -o $@ lua.o -L. -llua -llualib -lm
|
1993-12-17 10:59:10 -08:00
|
|
|
|
1996-11-06 12:48:03 -08:00
|
|
|
liblua.a : $(LUAOBJS)
|
1993-12-17 10:59:10 -08:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
1996-11-06 12:48:03 -08:00
|
|
|
ranlib $@
|
1993-12-17 10:59:10 -08:00
|
|
|
|
1996-11-06 12:48:03 -08:00
|
|
|
liblualib.a : $(LIBOBJS)
|
1993-12-17 10:59:10 -08:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
|
|
|
ranlib $@
|
|
|
|
|
|
|
|
liblua.so.1.0 : lua.o
|
|
|
|
ld -o liblua.so.1.0 $(LUAOBJS)
|
|
|
|
|
1996-11-06 12:48:03 -08:00
|
|
|
y.tab.c y.tab.h : lua.stx
|
|
|
|
yacc -d lua.stx
|
1993-12-17 10:59:10 -08:00
|
|
|
|
1996-11-06 12:48:03 -08: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 08:14:04 -08:00
|
|
|
|
1996-11-06 12:48:03 -08:00
|
|
|
parser.h : y.tab.h
|
|
|
|
sed -e 's/yy/luaY_/g' y.tab.h > parser.h
|
1993-12-17 10:59:10 -08:00
|
|
|
|
1994-07-19 15:04:51 -07:00
|
|
|
clear :
|
|
|
|
rcsclean
|
|
|
|
rm -f *.o
|
1995-12-21 08:14:04 -08:00
|
|
|
rm -f parser.c parser.h y.tab.c y.tab.h
|
1995-10-17 07:12:45 -07:00
|
|
|
co lua.h lualib.h luadebug.h
|
1994-07-19 15:04:51 -07:00
|
|
|
|
1996-03-15 10:22:09 -08:00
|
|
|
|
1996-11-06 12:48:03 -08:00
|
|
|
%.h : RCS/%.h,v
|
|
|
|
co $@
|
|
|
|
|
|
|
|
%.c : RCS/%.c,v
|
|
|
|
co $@
|
1994-01-10 11:49:56 -08:00
|
|
|
|
1994-11-23 12:15:04 -08:00
|
|
|
|
1997-06-16 09:50:22 -07:00
|
|
|
auxlib.o: auxlib.c lua.h auxlib.h luadebug.h
|
1997-03-31 06:23:49 -08:00
|
|
|
fallback.o: fallback.c auxlib.h lua.h luamem.h fallback.h opcode.h \
|
|
|
|
types.h tree.h func.h table.h hash.h
|
1997-03-05 05:37:04 -08:00
|
|
|
func.o: func.c luadebug.h lua.h table.h tree.h types.h opcode.h func.h \
|
1997-07-31 13:45:25 -07:00
|
|
|
luamem.h inout.h
|
1997-03-31 06:19:01 -08:00
|
|
|
hash.o: hash.c luamem.h opcode.h lua.h types.h tree.h func.h hash.h \
|
1997-04-06 07:08:08 -07:00
|
|
|
table.h auxlib.h
|
1997-06-16 09:50:22 -07:00
|
|
|
inout.o: inout.c auxlib.h lua.h fallback.h opcode.h types.h tree.h \
|
|
|
|
func.h hash.h inout.h lex.h zio.h luamem.h table.h undump.h
|
1997-07-31 13:45:25 -07:00
|
|
|
iolib.o: iolib.c lualoc.h lua.h auxlib.h luadebug.h lualib.h
|
1997-03-31 06:23:49 -08:00
|
|
|
lex.o: lex.c auxlib.h lua.h luamem.h tree.h types.h table.h opcode.h \
|
1997-06-16 09:50:22 -07:00
|
|
|
func.h lex.h zio.h inout.h luadebug.h parser.h
|
1997-07-31 13:45:25 -07:00
|
|
|
lua.o: lua.c lualoc.h luadebug.h lua.h auxlib.h lualib.h
|
1997-03-31 06:19:01 -08:00
|
|
|
luamem.o: luamem.c luamem.h lua.h
|
1997-03-31 06:23:49 -08:00
|
|
|
mathlib.o: mathlib.c lualib.h lua.h auxlib.h
|
1997-07-31 13:45:25 -07:00
|
|
|
opcode.o: opcode.c lualoc.h luadebug.h lua.h luamem.h opcode.h types.h \
|
|
|
|
tree.h func.h hash.h inout.h table.h fallback.h auxlib.h lex.h zio.h
|
1997-06-16 09:50:22 -07:00
|
|
|
parser.o: parser.c luadebug.h lua.h luamem.h lex.h zio.h opcode.h \
|
|
|
|
types.h tree.h func.h hash.h inout.h table.h
|
1997-03-31 06:23:49 -08:00
|
|
|
strlib.o: strlib.c lua.h auxlib.h lualib.h
|
1997-06-16 09:50:22 -07:00
|
|
|
table.o: table.c luamem.h auxlib.h lua.h func.h types.h tree.h \
|
|
|
|
opcode.h hash.h table.h inout.h fallback.h luadebug.h
|
|
|
|
tree.o: tree.c luamem.h lua.h tree.h types.h lex.h zio.h hash.h \
|
|
|
|
opcode.h func.h table.h fallback.h
|
|
|
|
undump.o: undump.c auxlib.h lua.h opcode.h types.h tree.h func.h \
|
|
|
|
luamem.h table.h undump.h zio.h
|
|
|
|
zio.o: zio.c zio.h
|