[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: luafilesystem makefile issue
- From: Julien MARBACH <jmh@...>
- Date: Tue, 12 Apr 2005 18:55:33 +0200
Tomas a écrit :
Here is the makefile I wrote to build a static library (liblfs.a) as you
This library is used for lua to acces
the luafilesystem functions, am I right?
The question is : is it
possible to built luafilesystem staticly in lua to avoid the use of a
Sure! You'll need to change the Makefile to build a static
library. Do you know how to do that?
all: lfs.o compat-5.1.o lib
lfs.o : lfs.c
gcc -Os -Wall -c lfs.c -o lfs.o
compat-5.1.o : compat-5.1.c
gcc -Os -Wall -c compat-5.1.c -o compat-5.1.o
lib : lfs.o compat-5.1.o
ar rcu lfslib.a lfs.o compat-5.1.o
rm -f lfs.o compat-5.1.o liblfs.a
Is that ok?
Do I only have to add my newly created liblfs.a to the objects when
linking the launcher?
Then, the static library should
be used to build the launcher executable,
I've no idea of how to add luaopen_lfs in 'package.preload'... it sounds
like chinese to me :-(
BUT you'll have to call the
initialization function (luaopen_lfs) or register it at `package.preload'
table (this way, require() will find it when trying to load the package).
Enough for me today... See you tomorow!