Auto-detect platform in makefiles and test runner

Use uname -s to select Linux vs macOS build flags instead of
hardcoding. Add -undefined dynamic_lookup for test shared libs
on macOS. Set _port=true automatically on non-Linux in ./all.
This commit is contained in:
Cormac Shannon
2026-02-28 19:27:14 +00:00
parent 27f16b126d
commit 84b9aeb7e9
3 changed files with 21 additions and 3 deletions

6
all
View File

@@ -2,7 +2,11 @@ make -s -j
cd testes/libs; make -s
cd .. # back to directory 'testes'
ulimit -S -s 1100
if { ../lua -W all.lua; } then
LUA_FLAGS="-W"
if [ "$(uname)" != "Linux" ]; then
LUA_FLAGS="$LUA_FLAGS -e_port=true"
fi
if { ../lua $LUA_FLAGS all.lua; } then
echo -e "\n\n final OK!!!!\n\n"
else
echo -e "\n\n >>>> BUG!!!!\n\n"