extend WANT_SYSTEM_LUA=1 to other distros

Only tested on Ubuntu at this point.

feedback on other distros is welcome
This commit is contained in:
nhmall
2026-05-19 11:38:05 -04:00
parent 5333747f02
commit 46735de8a6
5 changed files with 126 additions and 21 deletions
+4 -3
View File
@@ -127,8 +127,9 @@ LUATOP ?= $(LUAHEADERS)
LUAMAKEFLAGS ?= CC='$(CC)' SYSCFLAGS='$(SYSCFLAGS)'
LUA2NHTOP ?= ../../..
LUABASELIB ?= liblua-$(LUA_VERSION).a
TOPLUALIB ?= lib/lua/$(LUABASELIB)
LUATOPLIB ?= lib/lua/$(LUABASELIB)
LUAHPREFIX ?= ../
LUALIBBUILT ?= $(LUATOP)/liblua.a
ALLDEP = $(PRECHECK) $(GAME) recover Guidebook $(VARDAT) spec_levs check-dlb
@@ -144,11 +145,11 @@ lua_support: include/nhlua.h
@true
$(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
( cd $(LUATOP) && make $(LUAMAKEFLAGS) a )
$(TOPLUALIB): $(LUATOP)/liblua.a
lib/lua/$(LUABASELIB): $(LUALIBBUILT)
@( if test -d lib/lua ; then true ; else mkdir -p lib/lua ; fi )
cp $(LUATOP)/liblua.a $@
include/nhlua.h: $(TOPLUALIB)
include/nhlua.h: $(LUATOPLIB)
echo '/* nhlua.h - generated by top Makefile */' > $@
@echo '#include "$(LUAHPREFIX)$(LUAHEADERS)/lua.h"' >> $@
@sed -e '/(lua_error)/!d' \