Closed spiccinini closed 4 years ago
Hi spiccinini,
First, thank you for your suggestion and sorry for my late answer.
Regarding the suggested modifications:
link flags for Darwin: nice, but I can't test it either. So I will keep it and include it as soon I can test it.
-fPIC: any reason to put it as a distinct variable? I am used to put it in CFLAGS and LDFLAGS. I think I will keep doing it that way.
"%.o: src/%.c" target:
compile target: why do you include -l$(LUA_LIB) in the $(CC) line?
install target: yes, will add it.
removing AR definition: yes, it is not used (this is a leftover of other projects!)
remove LUADIR, LUAINC definitions, set LUA to the default Lua on the build machine: I usually build for a specific (maybe modified) version of Lua. Not for whatever happens to be installed on the build machine. I must be sure of what version I build against so the easiest and safest way for me is to identify with an explicit path the Lua executable (for the test) and the Lua include directory.
At the moment I prefer to keep the path definitions. The default values of LUA and LUAINC could just be changed for your default Lua installation
I will update the Makefile as soon as I can. Thanks again,
Phil
Makefile improvements that use more standarized variables. Also Os X is auto detected (I did not tested it but should work)
With this changes I am able to cross build this in openwrt.