[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Packageing a Lua module (or: lcurses for 5.3)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 10 Jan 2015 10:13:19 -0200
> Or just for this problem, won't somebody to whom the Gnu way is a
> piece of cake make us a Lua 5.3 rock for lcurses please?
Attached is a plain Makefile for building lcurses under Lua 5.1.
The Makefile works for Linux and Mac OS X (use the second definition of
SHARED). The autoconf stuff is probably for systems where it's hard to
find the curses library. I didn't bother with config.h, just hoped it'd
work. Since no tests are included, I did not test how it ran, only that
it built without a hitch.
I got lcurses from http://files.luaforge.net/releases/lcurses/lcurses/release6.
lcurses6 and 7 are for Lua 5.1. I haven't tried porting them to 5.2 and 5.3.
Or perhaps I got the wrong lcurses...
--lhf
LUAINC= /tmp/lua-5.1.5/src
CC= gcc
CFLAGS= -I$(LUAINC) -Wall -Wextra -O2
SHARED= -shared
SHARED= -bundle -undefined dynamic_lookup
all: curses.so
curses.so: lcurses.c
touch config.h
$(CC) $(CFLAGS) $(SHARED) -o $@ lcurses.c
clean:
rm -f curses.so