makefile: link Lua objects into libcallisto

Fixes: https://todo.sr.ht/~jeremy/callisto/13
This commit is contained in:
Jeremy Baxter 2024-06-13 11:10:31 +12:00
parent b6cd36ec38
commit 1a0a492215
2 changed files with 21 additions and 11 deletions

12
configure vendored
View file

@ -130,6 +130,14 @@ gen_LDFLAGS () {
ldflags="$(trim "$ldflags")"
}
## Lua objects
gen_LUAOBJS () {
for obj in $(make -Cexternal/lua -s echo | grep -E '^BASE_O= ' | cut -d " " -f2-); do
luaobjs="$luaobjs external/lua/$obj"
done
luaobjs="$(trim "$luaobjs")"
}
#
## misc. functions
#
@ -197,6 +205,7 @@ cd $(dirname $0)
gen_CC
gen_CFLAGS
gen_LDFLAGS
gen_LUAOBJS
printf '# generated by configure
@ -206,10 +215,13 @@ _CPPFLAGS = %s
_LDFLAGS =%s
_EXT_CPPFLAGS = %s
_LUAOBJS = %s
' \
"$cc" \
"$cflags" \
"$cppflags"\
"$ldflags" \
"$ext_cppflags"\
"$luaobjs"\
>"$mkf"