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:
parent
a6809fe480
commit
adb4091293
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -20,7 +20,7 @@ CJSON_CFLAGS = -Wno-sign-compare -Wno-unused-function
|
||||||
all: csto libcallisto.a
|
all: csto libcallisto.a
|
||||||
|
|
||||||
csto: ${LIBS} csto.o
|
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}
|
libcallisto.a: liblua.a ${CJSON_OBJS} ${OBJS}
|
||||||
ar cr $@ ${OBJS} ${CJSON_OBJS}
|
ar cr $@ ${OBJS} ${CJSON_OBJS}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue