workaround esoteric gcc behaviour on Linux

ld would fail to find Lua symbols in liblua.a, the solution is
to put all object files before static libraries on the command line.
This commit is contained in:
Jeremy Baxter 2024-01-17 20:29:42 +13:00
parent a6809fe480
commit adb4091293

View file

@ -20,7 +20,7 @@ CJSON_CFLAGS = -Wno-sign-compare -Wno-unused-function
all: csto libcallisto.a
csto: ${LIBS} csto.o
${CC} -o $@ libcallisto.a liblua.a csto.o ${LDFLAGS}
${CC} -o $@ csto.o libcallisto.a liblua.a ${LDFLAGS}
libcallisto.a: liblua.a ${CJSON_OBJS} ${OBJS}
ar cr $@ ${OBJS} ${CJSON_OBJS}