1994-01-10 22:49:56 +03:00
|
|
|
# $Id: makefile,v 1.4 1993/12/22 21:52:26 roberto Exp roberto $
|
1993-12-17 21:59:10 +03:00
|
|
|
# Compilation parameters
|
|
|
|
CC = gcc
|
1993-12-23 00:52:26 +03:00
|
|
|
CFLAGS = -I/usr/5include -Wall -O2 -DMAXCODE=4096 -DMAXCONSTANT=1024 -DMAXSYMBOL=1024
|
1993-12-17 21:59:10 +03:00
|
|
|
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = rvl
|
|
|
|
|
|
|
|
# Aplication modules
|
|
|
|
LUAMOD = \
|
|
|
|
y.tab \
|
1993-12-23 00:21:06 +03:00
|
|
|
lex \
|
1993-12-17 21:59:10 +03:00
|
|
|
opcode \
|
|
|
|
hash \
|
|
|
|
table \
|
|
|
|
inout
|
|
|
|
|
|
|
|
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 00:21:06 +03:00
|
|
|
lua.a : y.tab.c $(LUAOBJS)
|
1993-12-17 21:59:10 +03: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 00:21:06 +03:00
|
|
|
y.tab.c : lua.stx exscript
|
1993-12-17 21:59:10 +03:00
|
|
|
yacc -d lua.stx ; ex y.tab.c <exscript
|
|
|
|
|
1994-01-10 22:49:56 +03:00
|
|
|
% : RCS/%,v
|
1993-12-22 23:55:06 +03:00
|
|
|
co $@
|
1994-01-10 22:49:56 +03:00
|
|
|
|