diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-14 13:01:55 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-14 13:01:55 +0000 |
commit | 926c8ad88a5cce707fe1025f3551aa1c03318b32 (patch) | |
tree | 9d0c7d3102578adca5ab7381e3b1296f218270f8 /crawl-ref/source/makefile.dos | |
parent | 72560e17acd9fd40a9dcc969c14f3b1fd60fe96c (diff) | |
download | crawl-ref-926c8ad88a5cce707fe1025f3551aa1c03318b32.tar.gz crawl-ref-926c8ad88a5cce707fe1025f3551aa1c03318b32.zip |
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
Diffstat (limited to 'crawl-ref/source/makefile.dos')
-rw-r--r-- | crawl-ref/source/makefile.dos | 32 |
1 files changed, 27 insertions, 5 deletions
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 |