[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Numeric Lua 0.3
- From: Dirk Laurie <dpl@...>
- Date: Sun, 21 Aug 2011 10:48:06 +0200
On Sun, Aug 21, 2011 at 08:55:16AM +0200, Dirk Laurie wrote:
> On Sat, Aug 20, 2011 at 11:09:20PM +0200, Luis Carvalho wrote:
> > luarocks does not work with 5.2 out of the box, but you can fool it into
> > building a 5.2 module by installing luarocks using
> >
> > $ ./configure --with-lua-include=/usr/local/include --with-lua-lib=/usr/local/lib
> >
> Not that simple. luarocks, even luarocks 2.0.5, makes use of setfenv.
>
I thought of trying to patch luarocks, but found that for numlua
a common-or-garden makefile is easier.
~~~~
CC = cc -O2 -fPIC -lfftw3 -lhdf5 -llapack -lblas -shared
USR1 = -I/usr/include/lua5.1 -llua
USR2 = -I/usr/local/include -L/usr/local/lib -llua
INST1 = /usr/local/lib/lua/5.1
INST2 = /usr/local/lib/lua/5.2
PKG = numlua
5.1:
$(CC) $(USR1) *.c
sudo cp $(PKG).so $(INST1)
sudo mkdir -p $(INST1)/$(PKG)
sudo cp -r lhp *.lua $(INST1)/$(PKG)
5.2:
$(CC) $(USR2) *.c -o $(PKG).so
sudo cp $(PKG).so $(INST2)
sudo mkdir -p $(INST2)/$(PKG)
sudo cp -r lhp *.lua $(INST2)/$(PKG)
clean:
- rm *.o *.so
uninstall:
sudo rm -rf $(INST1)/$(PKG)*
sudo rm -rf $(INST2)/$(PKG)*
~~~~
I'm not sure whether just copying the lhp tree is adequate, but I don't
need it yet. I am now trying out NumLua with the new docs/index.html
open in my browser and enjoying the experience. Thanks, Luis!
Dirk