1997-09-16 23:33:21 +04:00
|
|
|
#
|
1997-09-26 19:02:26 +04:00
|
|
|
## $Id: makefile,v 1.1 1997/09/16 19:33:21 roberto Exp roberto $
|
1997-09-16 23:33:21 +04:00
|
|
|
## Makefile
|
|
|
|
## See Copyright Notice in lua.h
|
|
|
|
#
|
|
|
|
|
1995-10-09 21:51:49 +03:00
|
|
|
|
1997-09-16 23:33:21 +04:00
|
|
|
#CONFIGURATION
|
1995-10-09 21:51:49 +03:00
|
|
|
|
|
|
|
# define (undefine) POPEN if your system (does not) support piped I/O
|
1997-07-01 23:32:41 +04:00
|
|
|
#
|
1996-11-06 23:48:03 +03:00
|
|
|
# define (undefine) _POSIX_SOURCE if your system is (not) POSIX compliant
|
1997-07-01 23:32:41 +04: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 22:27:53 +04:00
|
|
|
# define LUA_COMPAT2_5=0 if yous system does not need to be compatible with
|
|
|
|
# version 2.5 (or older)
|
1997-07-01 23:32:41 +04:00
|
|
|
|
1997-09-26 19:02:26 +04:00
|
|
|
CONFIG = -DPOPEN -D_POSIX_SOURCE
|
1997-09-16 23:33:21 +04:00
|
|
|
#CONFIG = -DLUA_COMPAT2_5=0 -DOLD_ANSI -DDEBUG
|
1997-07-01 23:32:41 +04:00
|
|
|
|
|
|
|
|
1993-12-17 21:59:10 +03:00
|
|
|
# Compilation parameters
|
|
|
|
CC = gcc
|
1997-04-01 00:58:42 +04:00
|
|
|
CWARNS = -Wall -Wmissing-prototypes -Wshadow -pedantic -Wpointer-arith -Wcast-align -Waggregate-return
|
1997-07-01 23:32:41 +04:00
|
|
|
CFLAGS = $(CONFIG) $(CWARNS) -ansi -O2
|
1994-11-23 23:15:04 +03:00
|
|
|
|
1993-12-17 21:59:10 +03:00
|
|
|
|
|
|
|
AR = ar
|
|
|
|
ARFLAGS = rvl
|
|
|
|
|
1996-11-06 23:48:03 +03:00
|
|
|
|
1993-12-17 21:59:10 +03:00
|
|
|
# Aplication modules
|
1995-11-10 20:56:06 +03:00
|
|
|
LUAOBJS = \
|
1997-09-16 23:33:21 +04:00
|
|
|
lapi.o \
|
|
|
|
lauxlib.o \
|
|
|
|
lbuiltin.o \
|
|
|
|
ldo.o \
|
|
|
|
lfunc.o \
|
|
|
|
lgc.o \
|
|
|
|
llex.o \
|
|
|
|
lmem.o \
|
|
|
|
lobject.o \
|
|
|
|
lparser.o \
|
|
|
|
lstring.o \
|
|
|
|
ltable.o \
|
|
|
|
ltm.o \
|
|
|
|
lvm.o \
|
|
|
|
lundump.o \
|
|
|
|
lzio.o
|
1995-11-10 20:56:06 +03:00
|
|
|
|
|
|
|
LIBOBJS = \
|
1997-09-16 23:33:21 +04:00
|
|
|
liolib.o \
|
|
|
|
lmathlib.o \
|
|
|
|
lstrlib.o
|
1995-11-10 20:56:06 +03:00
|
|
|
|
1993-12-17 21:59:10 +03:00
|
|
|
|
1996-11-06 23:48:03 +03:00
|
|
|
lua : lua.o liblua.a liblualib.a
|
|
|
|
$(CC) $(CFLAGS) -o $@ lua.o -L. -llua -llualib -lm
|
1993-12-17 21:59:10 +03:00
|
|
|
|
1996-11-06 23:48:03 +03:00
|
|
|
liblua.a : $(LUAOBJS)
|
1993-12-17 21:59:10 +03:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
1996-11-06 23:48:03 +03:00
|
|
|
ranlib $@
|
1993-12-17 21:59:10 +03:00
|
|
|
|
1996-11-06 23:48:03 +03:00
|
|
|
liblualib.a : $(LIBOBJS)
|
1993-12-17 21:59:10 +03:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
|
|
|
ranlib $@
|
|
|
|
|
|
|
|
liblua.so.1.0 : lua.o
|
|
|
|
ld -o liblua.so.1.0 $(LUAOBJS)
|
|
|
|
|
1996-11-06 23:48:03 +03:00
|
|
|
y.tab.c y.tab.h : lua.stx
|
|
|
|
yacc -d lua.stx
|
1993-12-17 21:59:10 +03:00
|
|
|
|
1997-09-16 23:33:21 +04:00
|
|
|
lparser.c : y.tab.c
|
|
|
|
sed -e 's/yy/luaY_/g' -e 's/malloc\.h/stdlib\.h/g' y.tab.c > lparser.c
|
1995-12-21 19:14:04 +03:00
|
|
|
|
1997-09-16 23:33:21 +04:00
|
|
|
ltokens.h : y.tab.h
|
|
|
|
sed -e 's/yy/luaY_/g' y.tab.h > ltokens.h
|
1993-12-17 21:59:10 +03:00
|
|
|
|
1994-07-20 02:04:51 +04:00
|
|
|
clear :
|
|
|
|
rcsclean
|
|
|
|
rm -f *.o
|
1997-09-16 23:33:21 +04:00
|
|
|
rm -f lparser.c ltokens.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-11-06 23:48:03 +03:00
|
|
|
%.h : RCS/%.h,v
|
|
|
|
co $@
|
|
|
|
|
|
|
|
%.c : RCS/%.c,v
|
|
|
|
co $@
|
1994-01-10 22:49:56 +03:00
|
|
|
|
1994-11-23 23:15:04 +03:00
|
|
|
|
1997-09-16 23:33:21 +04:00
|
|
|
lapi.o: lapi.c lapi.h lua.h lobject.h lauxlib.h ldo.h lfunc.h lgc.h \
|
1997-09-26 19:02:26 +04:00
|
|
|
lmem.h lstring.h ltable.h ltm.h luadebug.h lvm.h
|
1997-09-16 23:33:21 +04:00
|
|
|
lauxlib.o: lauxlib.c lauxlib.h lua.h luadebug.h
|
|
|
|
lbuiltin.o: lbuiltin.c lapi.h lua.h lobject.h lauxlib.h lbuiltin.h \
|
1997-09-26 19:02:26 +04:00
|
|
|
lmem.h lstring.h ltable.h ltm.h
|
|
|
|
ldo.o: ldo.c lbuiltin.h ldo.h lobject.h lua.h lgc.h lmem.h lparser.h \
|
|
|
|
lzio.h ltm.h luadebug.h lundump.h lvm.h
|
1997-09-16 23:33:21 +04:00
|
|
|
lfunc.o: lfunc.c lfunc.h lobject.h lua.h lmem.h
|
1997-09-26 19:02:26 +04:00
|
|
|
lgc.o: lgc.c ldo.h lobject.h lua.h lfunc.h lgc.h lmem.h lstring.h \
|
|
|
|
ltable.h ltm.h
|
1997-09-16 23:33:21 +04:00
|
|
|
liolib.o: liolib.c lauxlib.h lua.h luadebug.h lualib.h
|
1997-09-26 19:02:26 +04:00
|
|
|
llex.o: llex.c llex.h lobject.h lua.h lzio.h lmem.h lparser.h \
|
|
|
|
lstring.h ltokens.h luadebug.h
|
1997-09-16 23:33:21 +04:00
|
|
|
lmathlib.o: lmathlib.c lauxlib.h lua.h lualib.h
|
|
|
|
lmem.o: lmem.c lmem.h lua.h
|
|
|
|
lobject.o: lobject.c lobject.h lua.h
|
1997-09-26 19:02:26 +04:00
|
|
|
lparser.o: lparser.c lauxlib.h lua.h ldo.h lobject.h lfunc.h llex.h \
|
|
|
|
lzio.h lmem.h lopcodes.h lparser.h lstring.h luadebug.h
|
1997-09-16 23:33:21 +04:00
|
|
|
lstring.o: lstring.c lmem.h lobject.h lua.h lstring.h
|
|
|
|
lstrlib.o: lstrlib.c lauxlib.h lua.h lualib.h
|
|
|
|
ltable.o: ltable.c lauxlib.h lua.h lmem.h lobject.h ltable.h
|
|
|
|
ltm.o: ltm.c lauxlib.h lua.h ldo.h lobject.h lmem.h ltm.h lapi.h
|
1997-09-26 19:02:26 +04:00
|
|
|
lua.o: lua.c lua.h luadebug.h lualib.h
|
1997-09-16 23:33:21 +04:00
|
|
|
lundump.o: lundump.c lundump.h lobject.h lua.h lzio.h
|
1997-09-26 19:02:26 +04:00
|
|
|
lvm.o: lvm.c lauxlib.h lua.h ldo.h lobject.h lfunc.h lgc.h lmem.h \
|
|
|
|
lopcodes.h lstring.h ltable.h ltm.h luadebug.h lvm.h
|
1997-09-16 23:33:21 +04:00
|
|
|
lzio.o: lzio.c lzio.h
|