lua/makefile

156 lines
5.2 KiB
Makefile
Raw Normal View History

# makefile for building Lua
# see INSTALL for installation instructions
# see ../Makefile and luaconf.h for further customization
1997-09-16 23:33:21 +04:00
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
CWARNS= -pedantic -Waggregate-return -Wcast-align \
-Wmissing-prototypes -Wpointer-arith -Wshadow \
-Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings
# -Wcast-qual
# -DEXTERNMEMCHECK -DHARDSTACKTESTS -DHARDMEMTESTS
# -g -DLUA_USER_H='"ltests.h"'
2004-12-22 16:05:33 +03:00
# -fomit-frame-pointer #-pg -malign-double
TESTS= -g -DLUA_USER_H='"ltests.h"'
2002-08-06 23:12:54 +04:00
LOCAL = $(TESTS) $(CWARNS)
2001-07-24 21:25:30 +04:00
1997-07-01 23:32:41 +04:00
CC= gcc
2006-06-09 21:31:14 +04:00
CFLAGS= -Wall $(MYCFLAGS) -O2
AR= ar rcu
RANLIB= ranlib
RM= rm -f
1997-07-01 23:32:41 +04:00
MYCFLAGS= $(LOCAL)
MYLDFLAGS=
MYLIBS=
2000-08-09 23:16:57 +04:00
2004-12-22 16:05:33 +03:00
# enable Linux goodies
2005-11-16 19:25:08 +03:00
MYCFLAGS= $(LOCAL) -DLUA_USE_LINUX
MYLDFLAGS= -Wl,-E
MYLIBS= -ldl -lreadline -lhistory -lncurses
1993-12-17 21:59:10 +03:00
1999-01-11 23:23:54 +03:00
# == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
1999-01-11 23:23:54 +03:00
1993-12-17 21:59:10 +03:00
LIBS = -lm
CORE_T= liblua.a
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
lundump.o lvm.o lzio.o ltests.o
AUX_O= lauxlib.o
LIB_O= lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o \
loadlib.o linit.o
1995-11-10 20:56:06 +03:00
LUA_T= lua
LUA_O= lua.o
1995-11-10 20:56:06 +03:00
LUAC_T= luac
LUAC_O= luac.o print.o
1993-12-17 21:59:10 +03:00
ALL_T= $(CORE_T) $(LUA_T) $(LUAC_T)
ALL_O= $(CORE_O) $(LUA_O) $(LUAC_O) $(AUX_O) $(LIB_O)
ALL_A= $(CORE_T)
1993-12-17 21:59:10 +03:00
all: $(ALL_T)
1993-12-17 21:59:10 +03:00
o: $(ALL_O)
1993-12-17 21:59:10 +03:00
a: $(ALL_A)
1993-12-17 21:59:10 +03:00
$(CORE_T): $(CORE_O) $(AUX_O) $(LIB_O)
$(AR) $@ $?
$(RANLIB) $@
1993-12-17 21:59:10 +03:00
$(LUA_T): $(LUA_O) $(CORE_T)
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(CORE_T) $(LIBS) $(MYLIBS) $(DL)
$(LUAC_T): $(LUAC_O) $(CORE_T)
$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(CORE_T) $(LIBS) $(MYLIBS)
1996-03-15 21:22:09 +03:00
clean:
2006-06-09 21:31:14 +04:00
rcsclean -u
$(RM) $(ALL_T) $(ALL_O)
depend:
@$(CC) $(CFLAGS) -MM *.c
echo:
@echo "CC = $(CC)"
@echo "CFLAGS = $(CFLAGS)"
@echo "AR = $(AR)"
@echo "RANLIB = $(RANLIB)"
@echo "RM = $(RM)"
@echo "MYCFLAGS = $(MYCFLAGS)"
@echo "MYLDFLAGS = $(MYLDFLAGS)"
@echo "MYLIBS = $(MYLIBS)"
@echo "DL = $(DL)"
# DO NOT DELETE
1998-05-27 17:08:34 +04:00
lapi.o: lapi.c lua.h luaconf.h lapi.h lobject.h llimits.h ldebug.h \
lstate.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h \
2002-10-26 01:38:17 +04:00
lundump.h lvm.h
lauxlib.o: lauxlib.c lua.h luaconf.h lauxlib.h
lbaselib.o: lbaselib.c lua.h luaconf.h lauxlib.h lualib.h
lcode.o: lcode.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \
lzio.h lmem.h lopcodes.h lparser.h ltable.h ldebug.h lstate.h ltm.h \
ldo.h lgc.h
ldblib.o: ldblib.c lua.h luaconf.h lauxlib.h lualib.h
ldebug.o: ldebug.c lua.h luaconf.h lapi.h lobject.h llimits.h lcode.h \
llex.h lzio.h lmem.h lopcodes.h lparser.h ltable.h ldebug.h lstate.h \
ltm.h ldo.h lfunc.h lstring.h lgc.h lvm.h
ldo.o: ldo.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lparser.h ltable.h \
lstring.h lundump.h lvm.h
ldump.o: ldump.c lua.h luaconf.h lobject.h llimits.h lopcodes.h lstate.h \
ltm.h lzio.h lmem.h lundump.h
lfunc.o: lfunc.c lua.h luaconf.h lfunc.h lobject.h llimits.h lgc.h lmem.h \
lstate.h ltm.h lzio.h
lgc.o: lgc.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h
2004-12-22 16:05:33 +03:00
linit.o: linit.c lua.h luaconf.h lualib.h lauxlib.h
liolib.o: liolib.c lua.h luaconf.h lauxlib.h lualib.h
llex.o: llex.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h ltm.h \
lzio.h lmem.h llex.h lparser.h ltable.h lstring.h lgc.h
lmathlib.o: lmathlib.c lua.h luaconf.h lauxlib.h lualib.h
lmem.o: lmem.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
ltm.h lzio.h lmem.h ldo.h
loadlib.o: loadlib.c lua.h luaconf.h lauxlib.h lualib.h
lobject.o: lobject.c lua.h luaconf.h ldo.h lobject.h llimits.h lstate.h \
ltm.h lzio.h lmem.h lstring.h lgc.h lvm.h
lopcodes.o: lopcodes.c lua.h luaconf.h lobject.h llimits.h lopcodes.h
2004-12-22 16:05:33 +03:00
loslib.o: loslib.c lua.h luaconf.h lauxlib.h lualib.h
lparser.o: lparser.c lua.h luaconf.h lcode.h llex.h lobject.h llimits.h \
lzio.h lmem.h lopcodes.h lparser.h ltable.h ldebug.h lstate.h ltm.h \
ldo.h lfunc.h lstring.h lgc.h
lstate.o: lstate.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h llex.h lstring.h ltable.h
lstring.o: lstring.c lua.h luaconf.h lmem.h llimits.h lobject.h lstate.h \
ltm.h lzio.h lstring.h lgc.h
lstrlib.o: lstrlib.c lua.h luaconf.h lauxlib.h lualib.h
ltable.o: ltable.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h \
ltm.h lzio.h lmem.h ldo.h lgc.h ltable.h
ltablib.o: ltablib.c lua.h luaconf.h lauxlib.h lualib.h
ltests.o: ltests.c lua.h luaconf.h lapi.h lobject.h llimits.h lauxlib.h \
lcode.h llex.h lzio.h lmem.h lopcodes.h lparser.h ltable.h ldebug.h \
lstate.h ltm.h ldo.h lfunc.h lstring.h lgc.h lualib.h
ltm.o: ltm.c lua.h luaconf.h lobject.h llimits.h lstate.h ltm.h lzio.h \
lmem.h lstring.h lgc.h ltable.h
lua.o: lua.c lua.h luaconf.h lauxlib.h lualib.h
lundump.o: lundump.c lua.h luaconf.h ldebug.h lstate.h lobject.h \
llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lopcodes.h lstring.h lgc.h \
lundump.h
lvm.o: lvm.c lua.h luaconf.h ldebug.h lstate.h lobject.h llimits.h ltm.h \
lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h ltable.h lvm.h
lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \
lzio.h
# (end of Makefile)