[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Generating makefile for C library.
- From: Asko Kauppi <askok@...>
- Date: Mon, 27 Oct 2008 20:42:23 +0200
Sam Roberts kirjoitti 27.10.2008 kello 18:26:
On Mon, Oct 27, 2008 at 1:27 AM, Heesob Park <firstname.lastname@example.org> wrote:
Is there any module for automating makefile generation?
Check on luaforge, but I've never seen one used. Its kindof clunky,
but lua projects just seem to come with simple makefiles. The
philosophy seems to be, agree with it or not, that lua is mostly used
as a script core embedded into larger projects - and that you will use
that larger projects build system.
Well, he was asking about a C library, a Lua module that is.
I would suggest taking some existing one, s.a. Lua Lanes or maybe
LuaSocket, and seeing how that is being built.
There is also a wiki page about OS specific issues, which are a few.
It wouldn't be bad to have a simple, multi-OS makefile sample
somewhere. Maybe you will do that?
How to get the lib and include directory name of the current Lua
install environment with Lua script?
You might be able to process the package.path and cpath to deduce
where the default install locations should be:
% lua -e 'print(package.path)'
% lua -e 'print(package.cpath)'
Depends on your system, which you did not name to us.
On OS X with fink Lua 5.1:
$ pkg-config lua --variable=INSTALL_LMOD
$ pkg-config lua --variable=INSTALL_CMOD
Those variables are in the 'etc/lua.pc' that comes with Lua itself, so
maybe this works with other distributions as well.