lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



Is there a reasoning why the shared libraries are not build targets in the 5.1 Makefile?

There's been separate requests about this recently, on OS X as well as now Linux. Wouldn't it be enough to just have liblua.dylib and liblua.so targets, in the Makefile, even if they wouldn't be normally built.

This way, no machine specific ifdefs would need to be used. The people wondering "how" would see the targets, and say "make liblua.so".

-asko

Maybe this has been stated already - if so I'm sorry it missed my eyes).


On Wed, 04 Oct 2006 06:30:16 +0200
 Luca <liliana.perossa@fastwebnet.it> wrote:
Thomas Lefort wrote:
How can I build the shared libraries from source?
System is linux, so I use the make linux.

You'll have to complete src/Makefile. Name the target, add it to the
main list, and add a build rule, like this:

LUA_SO=liblua.so

ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)

$(LUA_SO): $(CORE_O) $(LIB_O)
    $(CC) -o $@ -shared $?

Also in the main Makefile, have the shared library installed along
with the static one:

TO_LIB= liblua.a liblua.so

Good luck !

Thanks, that worked!

Bye,
Luca