From 926c8ad88a5cce707fe1025f3551aa1c03318b32 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sat, 14 Apr 2007 13:01:55 +0000 Subject: Included Lua 5.1.2 source tree in crawl-ref/source/util. This is so we can use Lua in core Crawl code without making Crawl harder to build (than it is already). Crawl's makefiles will call the Lua makefile if necessary (i.e., if liblua.a doesn't already exist). CLUA_BINDINGS is still not enabled by default (and will not be enabled by default in the source tree). Crawl will use two different Lua interpreter instances - one for user scripts (if CLUA_BINDINGS is defined), the other (not #ifdef conditionalised) for core game Lua glue. Lua is statically linked by default. We could change this if necessary, although the added size is only 200k. The Lua sources are almost unmodified; I've only added new targets for Crawl's platform-specific makefiles to call into to build liblua.a; I've not modified any existing targets, and all Lua READMEs and copyright notices are intact. Needs integration with Xcode build. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1305 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/makefile.dos | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/makefile.dos') diff --git a/crawl-ref/source/makefile.dos b/crawl-ref/source/makefile.dos index 4535c7df19..fb9947e7db 100644 --- a/crawl-ref/source/makefile.dos +++ b/crawl-ref/source/makefile.dos @@ -13,14 +13,22 @@ DELETE = del COPY = copy OS_TYPE = DOS -LIB = - # If you don't have flex or bison, set DOYACC to N or empty. DOYACC := n LEX := flex YACC := bison -y -INCLUDES := -Iutil -I. +ifeq ($(LUASRC),) +LUASRC := util\lua\src\\ +endif + +LUALIB = lua +LUALIBA = lib$(LUALIB).a + +LIB = -L$(LUASRC) -l$(LUALIB) +INCLUDES := -Iutil -I. -I$(LUASRC) + +WORKDIR := $(shell cd) CFWARN := -Wall -Wwrite-strings -Wshadow -Werror -pedantic CFOTHERS := -D$(OS_TYPE) $(EXTRA_FLAGS) -fsigned-char -fstrict-aliasing @@ -49,7 +57,7 @@ endif OBJECTS := $(UTIL)levcomp.o $(UTIL)levtab.o $(UTIL)levlex.o $(OBJECTS) -GAME_DEPENDS := $(OBJECTS) +GAME_DEPENDS := $(LUASRC)$(LUALIBA) $(OBJECTS) ########################################################################## @@ -117,7 +125,12 @@ clean: $(subst /,\,$(DELETE) $(UTIL)levtab.*) $(subst /,\,$(DELETE) $(UTIL)levlex.*) -distclean: +clean-lua: + cd $(LUASRC) + $(MAKE) clean_win + cd $(WORKDIR) + +distclean: clean-lua $(DELETE) *.o $(DELETE) bones.* $(DELETE) morgue.txt @@ -145,3 +158,12 @@ profile: $(GAME_DEPENDS) # #.h.cc: # touch $@ + +############################################################################# +# Build Lua + +$(LUASRC)$(LUALIBA): + @echo Building Lua... + @cd $(LUASRC) + @$(MAKE) crawl_dos + @cd $(WORKDIR) \ No newline at end of file -- cgit v1.2.3-54-g00ecf