1995-10-17 11:16:58 -07:00
|
|
|
# $Id: makefile,v 1.14 1995/10/17 14:12:45 roberto Exp $
|
1995-10-09 11:51:49 -07:00
|
|
|
|
|
|
|
#configuration
|
|
|
|
|
|
|
|
# define (undefine) POPEN if your system (does not) support piped I/O
|
|
|
|
CONFIG = -DPOPEN
|
1993-12-17 10:59:10 -08:00
|
|
|
# Compilation parameters
|
|
|
|
CC = gcc
|
1995-10-09 11:51:49 -07:00
|
|
|
CFLAGS = $(CONFIG) -I/usr/5include -Wall -Wmissing-prototypes -Wshadow -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
|
|
|
|
|
|
|
|
# Aplication modules
|
|
|
|
LUAMOD = \
|
1994-12-27 12:50:38 -08:00
|
|
|
parser \
|
1993-12-22 13:21:06 -08:00
|
|
|
lex \
|
1993-12-17 10:59:10 -08:00
|
|
|
opcode \
|
|
|
|
hash \
|
|
|
|
table \
|
1994-07-19 14:35:36 -07:00
|
|
|
inout \
|
1994-11-23 12:15:04 -08:00
|
|
|
tree \
|
|
|
|
fallback\
|
1995-10-09 11:51:49 -07:00
|
|
|
mem \
|
|
|
|
func
|
1993-12-17 10:59:10 -08:00
|
|
|
|
|
|
|
LIBMOD = \
|
|
|
|
iolib \
|
|
|
|
strlib \
|
|
|
|
mathlib
|
|
|
|
|
|
|
|
LUAOBJS = $(LUAMOD:%=%.o)
|
|
|
|
|
|
|
|
LIBOBJS = $(LIBMOD:%=%.o)
|
|
|
|
|
|
|
|
lua : lua.o lua.a lualib.a
|
1995-10-17 11:16:58 -07:00
|
|
|
$(CC) $(CFLAGS) -o $@ lua.o lua.a lualib.a -lm
|
1993-12-17 10:59:10 -08:00
|
|
|
|
1994-12-27 12:50:38 -08:00
|
|
|
lua.a : parser.c $(LUAOBJS)
|
1993-12-17 10:59:10 -08: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)
|
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
|
1995-02-02 11:04:16 -08:00
|
|
|
parser.c : lua.stx
|
|
|
|
yacc++ -d lua.stx ; mv -f y.tab.c parser.c ; mv -f 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
|
1994-12-27 12:50:38 -08:00
|
|
|
rm -f parser.c parser.h
|
1995-10-17 07:12:45 -07:00
|
|
|
co lua.h lualib.h luadebug.h
|
1994-07-19 15:04:51 -07:00
|
|
|
|
1994-01-10 11:49:56 -08:00
|
|
|
% : RCS/%,v
|
1993-12-22 12:55:06 -08:00
|
|
|
co $@
|
1994-01-10 11:49:56 -08:00
|
|
|
|
1994-11-23 12:15:04 -08:00
|
|
|
|
1995-10-09 11:51:49 -07:00
|
|
|
fallback.o : fallback.c mem.h fallback.h opcode.h lua.h types.h tree.h func.h
|
|
|
|
func.o : func.c table.h tree.h types.h opcode.h lua.h func.h mem.h
|
|
|
|
hash.o : hash.c mem.h opcode.h lua.h types.h tree.h func.h hash.h table.h
|
|
|
|
inout.o : inout.c mem.h opcode.h lua.h types.h tree.h func.h hash.h inout.h \
|
|
|
|
table.h
|
1995-10-17 07:12:45 -07:00
|
|
|
iolib.o : iolib.c lua.h lualib.h luadebug.h
|
1995-10-09 11:51:49 -07:00
|
|
|
lex.o : lex.c mem.h tree.h types.h table.h opcode.h lua.h func.h inout.h parser.h \
|
|
|
|
ugly.h
|
1994-11-23 12:15:04 -08:00
|
|
|
lua.o : lua.c lua.h lualib.h
|
|
|
|
mathlib.o : mathlib.c lualib.h lua.h
|
|
|
|
mem.o : mem.c mem.h lua.h
|
1995-10-09 11:51:49 -07:00
|
|
|
opcode.o : opcode.c mem.h opcode.h lua.h types.h tree.h func.h hash.h inout.h \
|
1995-10-17 07:12:45 -07:00
|
|
|
table.h fallback.h luadebug.h
|
1995-10-09 11:51:49 -07:00
|
|
|
parser.o : parser.c mem.h opcode.h lua.h types.h tree.h func.h hash.h inout.h \
|
|
|
|
table.h
|
|
|
|
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 \
|
|
|
|
inout.h fallback.h
|
|
|
|
tree.o : tree.c mem.h lua.h tree.h types.h table.h opcode.h func.h
|