1994-07-20 06:17:02 +08:00
|
|
|
# $Id: makefile,v 1.7 1994/07/19 22:04:51 celes Exp $
|
1993-12-18 02:59:10 +08:00
|
|
|
# Compilation parameters
|
|
|
|
CC = gcc
|
1994-07-20 06:17:02 +08:00
|
|
|
CFLAGS = -I/usr/5include -Wall -Wmissing-prototypes -ansi -O2
|
1993-12-18 02:59:10 +08:00
|
|
|
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = rvl
|
|
|
|
|
|
|
|
# Aplication modules
|
|
|
|
LUAMOD = \
|
|
|
|
y.tab \
|
1993-12-23 05:21:06 +08:00
|
|
|
lex \
|
1993-12-18 02:59:10 +08:00
|
|
|
opcode \
|
|
|
|
hash \
|
|
|
|
table \
|
1994-07-20 05:35:36 +08:00
|
|
|
inout \
|
|
|
|
tree
|
1993-12-18 02:59:10 +08:00
|
|
|
|
|
|
|
LIBMOD = \
|
|
|
|
iolib \
|
|
|
|
strlib \
|
|
|
|
mathlib
|
|
|
|
|
|
|
|
LUAOBJS = $(LUAMOD:%=%.o)
|
|
|
|
|
|
|
|
LIBOBJS = $(LIBMOD:%=%.o)
|
|
|
|
|
|
|
|
lua : lua.o lua.a lualib.a
|
|
|
|
$(CC) $(CFLAGS) -o $@ lua.c lua.a lualib.a -lm
|
|
|
|
|
1993-12-23 05:21:06 +08:00
|
|
|
lua.a : y.tab.c $(LUAOBJS)
|
1993-12-18 02:59:10 +08:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
|
|
|
ranlib lua.a
|
|
|
|
|
|
|
|
lualib.a : $(LIBOBJS)
|
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
|
|
|
ranlib $@
|
|
|
|
|
|
|
|
.KEEP_STATE:
|
|
|
|
|
|
|
|
liblua.so.1.0 : lua.o
|
|
|
|
ld -o liblua.so.1.0 $(LUAOBJS)
|
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
|
1993-12-23 05:21:06 +08:00
|
|
|
y.tab.c : lua.stx exscript
|
1993-12-18 02:59:10 +08:00
|
|
|
yacc -d lua.stx ; ex y.tab.c <exscript
|
|
|
|
|
1994-07-20 06:04:51 +08:00
|
|
|
clear :
|
|
|
|
rcsclean
|
|
|
|
rm -f *.o
|
|
|
|
rm -f y.tab.c y.tab.h
|
|
|
|
|
1994-01-11 03:49:56 +08:00
|
|
|
% : RCS/%,v
|
1993-12-23 04:55:06 +08:00
|
|
|
co $@
|
1994-01-11 03:49:56 +08:00
|
|
|
|