lua/makefile

170 lines
4.7 KiB
Makefile
Raw Normal View History

1997-09-17 03:33:21 +08:00
#
2000-08-10 03:16:57 +08:00
## $Id: makefile,v 1.25 2000/04/24 21:05:11 roberto Exp roberto $
1997-09-17 03:33:21 +08:00
## Makefile
## See Copyright Notice in lua.h
#
1997-09-17 03:33:21 +08:00
#CONFIGURATION
# define (undefine) POPEN if your system (does not) support piped I/O
1997-07-02 03:32:41 +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
# 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)
2000-08-10 03:16:57 +08:00
# you may need to adapat the code, too.
#
2000-04-25 05:05:11 +08:00
# define LUA_COMPAT_READPATTERN if you need read patterns
2000-02-22 21:31:43 +08:00
# (only for compatibility with previous versions)
2000-08-10 03:16:57 +08:00
# define LUA_COMPAT_ARGRET for compatibility in the way function results
# are passed as arguments
# define LUA_DEPRECATETFUNCS to include obsolete functions
1997-07-02 03:32:41 +08:00
2000-08-10 03:16:57 +08:00
CONFIG = -DPOPEN -D_POSIX_SOURCE -DDEBUG
#CONFIG = -DOLD_ANSI -DDEBUG -DLUA_COMPAT_READPATTERN -DLUA_COMPAT_ARGRET
# -DLUA_DEPRECATETFUNCS
1997-07-02 03:32:41 +08:00
1993-12-18 02:59:10 +08:00
# Compilation parameters
2000-08-10 03:16:57 +08:00
CC = g++
CWARNS = -Wall -W -pedantic \
-Waggregate-return \
-Wcast-align \
-Wmissing-prototypes \
-Wnested-externs \
-Wpointer-arith \
-Wshadow \
-Wwrite-strings
# -Wcast-qual
# -Wtraditional
1997-07-02 03:32:41 +08:00
CFLAGS = $(CONFIG) $(CWARNS) -ansi -O2
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
1993-12-18 02:59:10 +08:00
# Aplication modules
1995-11-11 01:56:06 +08:00
LUAOBJS = \
lstate.o \
lref.o \
1997-09-17 03:33:21 +08:00
lapi.o \
lauxlib.o \
lbuiltin.o \
lmem.o \
lstring.o \
ltable.o \
ltm.o \
lvm.o \
ldo.o \
lobject.o \
lbuffer.o \
lfunc.o \
lgc.o \
lcode.o \
lparser.o \
llex.o \
1997-09-17 03:33:21 +08:00
lundump.o \
2000-02-22 21:31:43 +08:00
lzio.o \
ldebug.o \
2000-02-22 21:31:43 +08:00
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 \
2000-08-10 03:16:57 +08:00
ldblib.o
1995-11-11 01:56:06 +08:00
1993-12-18 02:59:10 +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
liblua.a : $(LUAOBJS)
1993-12-18 02:59:10 +08:00
$(AR) $(ARFLAGS) $@ $?
ranlib $@
1993-12-18 02:59:10 +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)
clear :
rcsclean
2000-02-22 21:31:43 +08:00
rm -f *.o *.a
1996-03-16 02:22:09 +08:00
%.h : RCS/%.h,v
1999-01-12 04:23:54 +08:00
co $(CO_OPTIONS) $@
%.c : RCS/%.c,v
1999-01-12 04:23:54 +08:00
co $(CO_OPTIONS) $@
1998-05-27 21:08:34 +08:00
2000-08-10 03:16:57 +08:00
lapi.o: lapi.c lua.h lapi.h lobject.h llimits.h lauxlib.h ldo.h \
lstate.h luadebug.h lfunc.h lgc.h lmem.h lref.h lstring.h ltable.h \
ltm.h lvm.h
2000-08-10 03:16:57 +08:00
lauxlib.o: lauxlib.c lua.h lauxlib.h luadebug.h
lbuffer.o: lbuffer.c lua.h lauxlib.h lmem.h llimits.h lstate.h \
lobject.h luadebug.h
lbuiltin.o: lbuiltin.c lua.h lapi.h lobject.h llimits.h lauxlib.h \
lbuiltin.h ldo.h lstate.h luadebug.h lfunc.h lmem.h lstring.h \
ltable.h ltm.h lundump.h lzio.h lvm.h
2000-08-10 03:16:57 +08:00
lcode.o: lcode.c /usr/include/stdlib.h lua.h lcode.h llex.h lobject.h \
llimits.h lzio.h lopcodes.h lparser.h ldo.h lstate.h luadebug.h \
lmem.h
ldblib.o: ldblib.c lua.h lauxlib.h luadebug.h lualib.h
ldebug.o: ldebug.c lua.h lapi.h lobject.h llimits.h lauxlib.h lcode.h \
llex.h lzio.h lopcodes.h lparser.h ldebug.h lstate.h luadebug.h ldo.h \
lfunc.h ltable.h ltm.h
ldo.o: ldo.c lua.h lauxlib.h ldebug.h lstate.h lobject.h llimits.h \
luadebug.h ldo.h lgc.h lmem.h lparser.h lzio.h lstring.h ltable.h \
ltm.h lundump.h lvm.h
lfunc.o: lfunc.c lua.h lfunc.h lobject.h llimits.h lmem.h lstate.h \
luadebug.h
2000-08-10 03:16:57 +08:00
lgc.o: lgc.c lua.h ldo.h lobject.h llimits.h lstate.h luadebug.h \
lfunc.h lgc.h lmem.h lref.h lstring.h ltable.h ltm.h
2000-08-10 03:16:57 +08:00
liolib.o: liolib.c lua.h lauxlib.h luadebug.h lualib.h
llex.o: llex.c lua.h lauxlib.h llex.h lobject.h llimits.h lzio.h \
lmem.h lparser.h lstate.h luadebug.h lstring.h ltable.h
lmathlib.o: lmathlib.c lua.h lauxlib.h lualib.h
lmem.o: lmem.c lua.h ldo.h lobject.h llimits.h lstate.h luadebug.h \
lmem.h
lobject.o: lobject.c lua.h lobject.h llimits.h
lparser.o: lparser.c lua.h lcode.h llex.h lobject.h llimits.h lzio.h \
lopcodes.h lparser.h lfunc.h lmem.h lstate.h luadebug.h lstring.h
lref.o: lref.c lua.h lapi.h lobject.h llimits.h lmem.h lref.h lstate.h \
luadebug.h
2000-08-10 03:16:57 +08:00
lstate.o: lstate.c lua.h lauxlib.h lbuiltin.h ldo.h lobject.h \
llimits.h lstate.h luadebug.h lgc.h llex.h lzio.h lmem.h lref.h \
2000-08-10 03:16:57 +08:00
lstring.h ltable.h ltm.h
lstring.o: lstring.c lua.h lmem.h llimits.h lobject.h lstate.h \
luadebug.h lstring.h
2000-08-10 03:16:57 +08:00
lstrlib.o: lstrlib.c lua.h lauxlib.h lualib.h
ltable.o: ltable.c lua.h lauxlib.h lmem.h llimits.h lobject.h lstate.h \
luadebug.h lstring.h ltable.h
ltests.o: ltests.c lua.h lapi.h lobject.h llimits.h lauxlib.h lcode.h \
llex.h lzio.h lopcodes.h lparser.h ldebug.h lstate.h luadebug.h ldo.h \
lfunc.h lmem.h lstring.h ltable.h
ltm.o: ltm.c lua.h lauxlib.h lmem.h llimits.h lobject.h lstate.h \
luadebug.h ltm.h
lua.o: lua.c lua.h luadebug.h lualib.h
2000-08-10 03:16:57 +08:00
lundump.o: lundump.c lua.h lauxlib.h lfunc.h lobject.h llimits.h \
lmem.h lopcodes.h lstring.h lstate.h luadebug.h lundump.h lzio.h
2000-08-10 03:16:57 +08:00
lvm.o: lvm.c lua.h lapi.h lobject.h llimits.h lauxlib.h ldebug.h \
lstate.h luadebug.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h \
ltm.h lvm.h
lzio.o: lzio.c lua.h lzio.h