differentiate lua object library names by Lua ver
This commit is contained in:
@@ -465,7 +465,7 @@ PACKAGE=@true
|
|||||||
MAKEDEFS = ../util/makedefs
|
MAKEDEFS = ../util/makedefs
|
||||||
|
|
||||||
# -lm required by lua
|
# -lm required by lua
|
||||||
LUALIB = ../lib/lua/liblua.a -lm $(DLLIB)
|
LUALIB = ../lib/lua/liblua-$(LUA_VERSION).a -lm $(DLLIB)
|
||||||
|
|
||||||
# timestamp files to reduce `make' overhead and shorten .o dependency lists
|
# timestamp files to reduce `make' overhead and shorten .o dependency lists
|
||||||
CONFIG_H = ../src/config.h-t
|
CONFIG_H = ../src/config.h-t
|
||||||
@@ -660,7 +660,7 @@ DUMB.Setup: ../include/extern.h
|
|||||||
cp ../include/extern.DUMB ../include/extern.h
|
cp ../include/extern.DUMB ../include/extern.h
|
||||||
@touch DUMB.Setup
|
@touch DUMB.Setup
|
||||||
|
|
||||||
../lib/lua/liblua.a ../include/nhlua.h:
|
../lib/lua/liblua-$(LUA_VERSION).a ../include/nhlua.h:
|
||||||
@( cd .. ; $(MAKE) lua_support )
|
@( cd .. ; $(MAKE) lua_support )
|
||||||
|
|
||||||
# dependencies for makedefs and its outputs, which the util
|
# dependencies for makedefs and its outputs, which the util
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ LUATESTTARGET = $(LUAHEADERS)/lua.h
|
|||||||
LUATOP = $(LUAHEADERS)
|
LUATOP = $(LUAHEADERS)
|
||||||
LUAMAKEFLAGS = CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)'
|
LUAMAKEFLAGS = CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)'
|
||||||
LUA2NHTOP = ../../..
|
LUA2NHTOP = ../../..
|
||||||
TOPLUALIB = lib/lua/liblua.a
|
TOPLUALIB = lib/lua/liblua-$(LUA_VERSION).a
|
||||||
|
|
||||||
ALLDEP = $(GAME) recover Guidebook $(VARDAT) spec_levs check-dlb
|
ALLDEP = $(GAME) recover Guidebook $(VARDAT) spec_levs check-dlb
|
||||||
|
|
||||||
@@ -119,14 +119,14 @@ all: $(ALLDEP)
|
|||||||
@echo "Done."
|
@echo "Done."
|
||||||
|
|
||||||
$(GAME): lua_support
|
$(GAME): lua_support
|
||||||
( cd src ; $(MAKE) $(GAME) )
|
( cd src ; $(MAKE) LUA_VERSION=$(LUA_VERSION) $(GAME) )
|
||||||
|
|
||||||
lua_support: include/nhlua.h
|
lua_support: include/nhlua.h
|
||||||
@true
|
@true
|
||||||
$(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
|
$(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
|
||||||
( cd $(LUATOP) \
|
( cd $(LUATOP) \
|
||||||
&& make $(LUAMAKEFLAGS) a && cd $(LUA2NHTOP) )
|
&& make $(LUAMAKEFLAGS) a && cd $(LUA2NHTOP) )
|
||||||
lib/lua/liblua.a: $(LUATOP)/liblua.a
|
$(TOPLUALIB): $(LUATOP)/liblua.a
|
||||||
@( if test -d lib/lua ; then true ; else mkdir -p lib/lua ; fi )
|
@( if test -d lib/lua ; then true ; else mkdir -p lib/lua ; fi )
|
||||||
cp $(LUATOP)/liblua.a $@
|
cp $(LUATOP)/liblua.a $@
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user