differentiate lua object library names by Lua ver

This commit is contained in:
nhmall
2022-05-19 07:44:29 -04:00
parent 8a6c3d8de5
commit f57555ae6b
2 changed files with 5 additions and 5 deletions

View File

@@ -465,7 +465,7 @@ PACKAGE=@true
MAKEDEFS = ../util/makedefs
# -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
CONFIG_H = ../src/config.h-t
@@ -660,7 +660,7 @@ DUMB.Setup: ../include/extern.h
cp ../include/extern.DUMB ../include/extern.h
@touch DUMB.Setup
../lib/lua/liblua.a ../include/nhlua.h:
../lib/lua/liblua-$(LUA_VERSION).a ../include/nhlua.h:
@( cd .. ; $(MAKE) lua_support )
# dependencies for makedefs and its outputs, which the util

View File

@@ -109,7 +109,7 @@ LUATESTTARGET = $(LUAHEADERS)/lua.h
LUATOP = $(LUAHEADERS)
LUAMAKEFLAGS = CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)'
LUA2NHTOP = ../../..
TOPLUALIB = lib/lua/liblua.a
TOPLUALIB = lib/lua/liblua-$(LUA_VERSION).a
ALLDEP = $(GAME) recover Guidebook $(VARDAT) spec_levs check-dlb
@@ -119,14 +119,14 @@ all: $(ALLDEP)
@echo "Done."
$(GAME): lua_support
( cd src ; $(MAKE) $(GAME) )
( cd src ; $(MAKE) LUA_VERSION=$(LUA_VERSION) $(GAME) )
lua_support: include/nhlua.h
@true
$(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
( cd $(LUATOP) \
&& 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 )
cp $(LUATOP)/liblua.a $@