1997-09-17 03:33:21 +08:00
|
|
|
#
|
2000-02-23 02:12:46 +08:00
|
|
|
## $Id: makefile,v 1.22 2000/02/22 13:31:43 roberto Exp roberto $
|
1997-09-17 03:33:21 +08:00
|
|
|
## Makefile
|
|
|
|
## See Copyright Notice in lua.h
|
|
|
|
#
|
|
|
|
|
1995-10-10 02:51:49 +08:00
|
|
|
|
1997-09-17 03:33:21 +08:00
|
|
|
#CONFIGURATION
|
1995-10-10 02:51:49 +08:00
|
|
|
|
|
|
|
# define (undefine) POPEN if your system (does not) support piped I/O
|
1997-07-02 03:32:41 +08:00
|
|
|
#
|
1996-11-07 04:48:03 +08:00
|
|
|
# define (undefine) _POSIX_SOURCE if your system is (not) POSIX compliant
|
1997-07-02 03:32:41 +08:00
|
|
|
#
|
|
|
|
# define (undefine) OLD_ANSI if your system does NOT have some new ANSI
|
1999-02-05 03:12:35 +08:00
|
|
|
# facilities (e.g. strerror, locale.h, memmove). SunOS does not comply;
|
|
|
|
# so, add "-DOLD_ANSI" on SunOS
|
1997-07-02 03:32:41 +08:00
|
|
|
#
|
1998-05-27 21:08:34 +08:00
|
|
|
# define LUA_NUM_TYPE if you need numbers to be different from double
|
1999-02-05 00:37:41 +08:00
|
|
|
# (for instance, -DLUA_NUM_TYPE=float)
|
1999-02-05 03:12:35 +08:00
|
|
|
#
|
1999-10-05 01:51:04 +08:00
|
|
|
# define LUA_COMPAT_GC if you need garbage-collect tag methods for tables
|
|
|
|
# (only for compatibility with previous versions)
|
2000-02-22 21:31:43 +08:00
|
|
|
#
|
|
|
|
# define COMPAT_READPATTERN if you need read patterns
|
|
|
|
# (only for compatibility with previous versions)
|
1997-07-02 03:32:41 +08:00
|
|
|
|
2000-02-23 02:12:46 +08:00
|
|
|
CONFIG = -DPOPEN -D_POSIX_SOURCE -DDEBUG -DLUA_COMPAT_ORDER_TM
|
|
|
|
#CONFIG = -DOLD_ANSI -DDEBUG -DLUA_COMPAT_GC -DCOMPAT_READPATTERN -DLUA_COMPAT_ORDER_TM
|
1997-07-02 03:32:41 +08:00
|
|
|
|
|
|
|
|
1993-12-18 02:59:10 +08:00
|
|
|
# Compilation parameters
|
|
|
|
CC = gcc
|
2000-02-22 21:31:43 +08:00
|
|
|
CWARNS = -Wall -W -Wmissing-prototypes -Wshadow -pedantic -Wpointer-arith -Wcast-align -Waggregate-return -Wwrite-strings -Wcast-qual -Wnested-externs
|
1997-07-02 03:32:41 +08:00
|
|
|
CFLAGS = $(CONFIG) $(CWARNS) -ansi -O2
|
1994-11-24 04:15:04 +08:00
|
|
|
|
1993-12-18 02:59:10 +08:00
|
|
|
|
1999-01-12 04:23:54 +08:00
|
|
|
# To make early versions
|
|
|
|
CO_OPTIONS =
|
|
|
|
|
|
|
|
|
1993-12-18 02:59:10 +08:00
|
|
|
AR = ar
|
|
|
|
ARFLAGS = rvl
|
|
|
|
|
1996-11-07 04:48:03 +08:00
|
|
|
|
1993-12-18 02:59:10 +08:00
|
|
|
# Aplication modules
|
1995-11-11 01:56:06 +08:00
|
|
|
LUAOBJS = \
|
1997-09-17 03:33:21 +08:00
|
|
|
lapi.o \
|
|
|
|
lauxlib.o \
|
1997-12-24 03:24:36 +08:00
|
|
|
lbuffer.o \
|
1997-09-17 03:33:21 +08:00
|
|
|
lbuiltin.o \
|
2000-02-22 21:31:43 +08:00
|
|
|
ldebug.o \
|
1997-09-17 03:33:21 +08:00
|
|
|
ldo.o \
|
|
|
|
lfunc.o \
|
|
|
|
lgc.o \
|
|
|
|
llex.o \
|
|
|
|
lmem.o \
|
|
|
|
lobject.o \
|
1998-05-27 21:08:34 +08:00
|
|
|
lparser.o \
|
2000-02-22 21:31:43 +08:00
|
|
|
lcode.o \
|
1999-10-05 01:51:04 +08:00
|
|
|
lref.o \
|
1997-11-20 01:29:23 +08:00
|
|
|
lstate.o \
|
1997-09-17 03:33:21 +08:00
|
|
|
lstring.o \
|
|
|
|
ltable.o \
|
|
|
|
ltm.o \
|
|
|
|
lvm.o \
|
|
|
|
lundump.o \
|
2000-02-22 21:31:43 +08:00
|
|
|
lzio.o \
|
|
|
|
ltests.o
|
1995-11-11 01:56:06 +08:00
|
|
|
|
|
|
|
LIBOBJS = \
|
1997-09-17 03:33:21 +08:00
|
|
|
liolib.o \
|
|
|
|
lmathlib.o \
|
1999-01-09 00:47:44 +08:00
|
|
|
lstrlib.o \
|
|
|
|
ldblib.o \
|
|
|
|
linit.o
|
1995-11-11 01:56:06 +08:00
|
|
|
|
1993-12-18 02:59:10 +08:00
|
|
|
|
1996-11-07 04:48:03 +08:00
|
|
|
lua : lua.o liblua.a liblualib.a
|
|
|
|
$(CC) $(CFLAGS) -o $@ lua.o -L. -llua -llualib -lm
|
1993-12-18 02:59:10 +08:00
|
|
|
|
1996-11-07 04:48:03 +08:00
|
|
|
liblua.a : $(LUAOBJS)
|
1993-12-18 02:59:10 +08:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
1996-11-07 04:48:03 +08:00
|
|
|
ranlib $@
|
1993-12-18 02:59:10 +08:00
|
|
|
|
1996-11-07 04:48:03 +08:00
|
|
|
liblualib.a : $(LIBOBJS)
|
1993-12-18 02:59:10 +08:00
|
|
|
$(AR) $(ARFLAGS) $@ $?
|
|
|
|
ranlib $@
|
|
|
|
|
|
|
|
liblua.so.1.0 : lua.o
|
|
|
|
ld -o liblua.so.1.0 $(LUAOBJS)
|
|
|
|
|
|
|
|
|
1994-07-20 06:04:51 +08:00
|
|
|
clear :
|
|
|
|
rcsclean
|
2000-02-22 21:31:43 +08:00
|
|
|
rm -f *.o *.a
|
1994-07-20 06:04:51 +08:00
|
|
|
|
1996-03-16 02:22:09 +08:00
|
|
|
|
1996-11-07 04:48:03 +08:00
|
|
|
%.h : RCS/%.h,v
|
1999-01-12 04:23:54 +08:00
|
|
|
co $(CO_OPTIONS) $@
|
1996-11-07 04:48:03 +08:00
|
|
|
|
|
|
|
%.c : RCS/%.c,v
|
1999-01-12 04:23:54 +08:00
|
|
|
co $(CO_OPTIONS) $@
|
1994-01-11 03:49:56 +08:00
|
|
|
|
1998-05-27 21:08:34 +08:00
|
|
|
|
2000-02-22 21:31:43 +08:00
|
|
|
lapi.o: lapi.c lapi.h lobject.h lua.h lauxlib.h ldo.h lstate.h \
|
1999-10-05 01:51:04 +08:00
|
|
|
luadebug.h lfunc.h lgc.h lmem.h lref.h lstring.h ltable.h ltm.h lvm.h
|
1997-12-24 03:24:36 +08:00
|
|
|
lauxlib.o: lauxlib.c lauxlib.h lua.h luadebug.h
|
1999-02-23 23:01:29 +08:00
|
|
|
lbuffer.o: lbuffer.c lauxlib.h lua.h lmem.h lstate.h lobject.h \
|
|
|
|
luadebug.h
|
2000-02-22 21:31:43 +08:00
|
|
|
lbuiltin.o: lbuiltin.c lapi.h lobject.h lua.h lauxlib.h lbuiltin.h \
|
1999-02-23 23:01:29 +08:00
|
|
|
ldo.h lstate.h luadebug.h lfunc.h lmem.h lstring.h ltable.h ltm.h \
|
|
|
|
lundump.h lzio.h lvm.h
|
2000-02-22 21:31:43 +08:00
|
|
|
lcode.o: lcode.c lcode.h llex.h lobject.h lua.h lzio.h lmem.h \
|
|
|
|
lopcodes.h lparser.h
|
1999-02-05 00:37:41 +08:00
|
|
|
ldblib.o: ldblib.c lauxlib.h lua.h luadebug.h lualib.h
|
2000-02-22 21:31:43 +08:00
|
|
|
ldebug.o: ldebug.c lapi.h lobject.h lua.h lauxlib.h ldebug.h \
|
|
|
|
luadebug.h ldo.h lstate.h lfunc.h ltable.h ltm.h
|
|
|
|
ldo.o: ldo.c lauxlib.h lua.h ldebug.h lobject.h luadebug.h ldo.h \
|
|
|
|
lstate.h lgc.h lmem.h lparser.h lopcodes.h lzio.h lstring.h ltm.h \
|
|
|
|
lundump.h lvm.h
|
1999-02-23 23:01:29 +08:00
|
|
|
lfunc.o: lfunc.c lfunc.h lobject.h lua.h lmem.h lstate.h luadebug.h
|
|
|
|
lgc.o: lgc.c ldo.h lobject.h lua.h lstate.h luadebug.h lfunc.h lgc.h \
|
2000-02-22 21:31:43 +08:00
|
|
|
lmem.h lref.h lstring.h ltable.h ltm.h
|
1999-01-09 00:47:44 +08:00
|
|
|
linit.o: linit.c lua.h lualib.h
|
1997-09-17 03:33:21 +08:00
|
|
|
liolib.o: liolib.c lauxlib.h lua.h luadebug.h lualib.h
|
1997-12-18 04:48:58 +08:00
|
|
|
llex.o: llex.c lauxlib.h lua.h llex.h lobject.h lzio.h lmem.h \
|
2000-02-22 21:31:43 +08:00
|
|
|
lparser.h lopcodes.h lstate.h luadebug.h lstring.h
|
1997-09-17 03:33:21 +08:00
|
|
|
lmathlib.o: lmathlib.c lauxlib.h lua.h lualib.h
|
2000-02-22 21:31:43 +08:00
|
|
|
lmem.o: lmem.c lmem.h lua.h lobject.h lstate.h luadebug.h
|
1997-09-17 03:33:21 +08:00
|
|
|
lobject.o: lobject.c lobject.h lua.h
|
2000-02-22 21:31:43 +08:00
|
|
|
lparser.o: lparser.c lcode.h llex.h lobject.h lua.h lzio.h ldo.h \
|
|
|
|
lstate.h luadebug.h lfunc.h lmem.h lopcodes.h lparser.h lstring.h
|
|
|
|
lref.o: lref.c lapi.h lobject.h lua.h lmem.h lref.h lstate.h \
|
|
|
|
luadebug.h
|
|
|
|
lstate.o: lstate.c lauxlib.h lua.h lbuiltin.h ldo.h lobject.h lstate.h \
|
|
|
|
luadebug.h lgc.h llex.h lzio.h lmem.h lref.h lstring.h ltm.h
|
|
|
|
lstring.o: lstring.c lmem.h lua.h lobject.h lstate.h luadebug.h \
|
1999-02-23 23:01:29 +08:00
|
|
|
lstring.h
|
1997-09-17 03:33:21 +08:00
|
|
|
lstrlib.o: lstrlib.c lauxlib.h lua.h lualib.h
|
1999-02-23 23:01:29 +08:00
|
|
|
ltable.o: ltable.c lauxlib.h lua.h lmem.h lobject.h lstate.h \
|
|
|
|
luadebug.h ltable.h
|
|
|
|
ltm.o: ltm.c lauxlib.h lua.h lmem.h lobject.h lstate.h luadebug.h \
|
|
|
|
ltm.h
|
1997-10-14 06:10:45 +08:00
|
|
|
lundump.o: lundump.c lauxlib.h lua.h lfunc.h lobject.h lmem.h \
|
2000-02-22 21:31:43 +08:00
|
|
|
lopcodes.h lstring.h lstate.h luadebug.h lundump.h lzio.h
|
|
|
|
lvm.o: lvm.c lauxlib.h lua.h ldebug.h lobject.h luadebug.h ldo.h \
|
|
|
|
lstate.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h ltm.h lvm.h
|
1997-09-17 03:33:21 +08:00
|
|
|
lzio.o: lzio.c lzio.h
|