]> granicus.if.org Git - nethack/commitdiff
differentiate lua object library names by Lua ver
authornhmall <nhmall@nethack.org>
Thu, 19 May 2022 11:44:29 +0000 (07:44 -0400)
committernhmall <nhmall@nethack.org>
Thu, 19 May 2022 11:44:29 +0000 (07:44 -0400)
sys/unix/Makefile.src
sys/unix/Makefile.top

index 90000e2b43325e6e1e672574abeaaae31ec68735..f5aedbae4fe17146073b4845676a2d3d52955c35 100644 (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
index 3d3b94cf88fa4ea9857e8992b1824b0e7e34ec42..7fbef30f9449cc4ee8b29d4fc4bcc5c2619dfca1 100644 (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 $@