lua-users home
lua-l archive

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


> Anyone know how to write a Makefile.am in order to generate a .so Lua
> module?

I'm sorry, I don't know anything about autotools but this works for me
in Linux:

MAKESO= $(CC) -shared

test.so:	test.o
	$(MAKESO) -o $@ test.o

In 64-bit Linux platforms, you may need to add -fPIC to CFLAGS.

For Mac OS X I use

MAKESO= env MACOSX_DEPLOYMENT_TARGET=10.3 $(CC) -bundle -undefined dynamic_lookup

(Perhaps it's time to move to 10.4 :-)