Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 854e9ae58e
Fetching contributors…

Cannot retrieve contributors at this time

81 lines (62 sloc) 1.642 kb
# makefile for gdbm library for Lua
# change these to reflect your Lua installation
LUA= /tmp/lhf/lua-5.1.4
LUAINC= $(LUA)/src
LUALIB= $(LUA)/src
LUABIN= $(LUA)/src
# these will probably work if Lua has been installed globally
#LUA= /usr/local
#LUAINC= $(LUA)/include
#LUALIB= $(LUA)/lib
#LUABIN= $(LUA)/bin
# if your system already has gdbm, this should suffice
GDBMLIB= -lgdbm
# otherwise, change these to reflect your gdbm installation
#GDBM= /tmp/lhf/gdbm-1.8.3
#GDBMINC= -I$(GDBM)
#GDBMLIB= $(GDBM)/.libs/libgdbm.a
# if your system already has gdbm, this should suffice
GDBMLIB= -lgdbm
# otherwise, change these to reflect your gdbm installation
GDBM= /tmp/lhf/gdbm-1.8.3
GDBMINC= -I$(GDBM)
GDBMLIB= $(GDBM)/.libs/libgdbm.a
# probably no need to change anything below here
CC= gcc
CFLAGS= $(INCS) $(WARN) -O2 $G
WARN= -ansi -pedantic -Wall
INCS= -I$(LUAINC) $(GDBMINC)
MAKESO= $(CC) -shared
#MAKESO= env MACOSX_DEPLOYMENT_TARGET=10.3 $(CC) -bundle -undefined dynamic_lookup
MYNAME= gdbm
MYLIB= l$(MYNAME)
T= $(MYNAME).so
OBJS= $(MYLIB).o
TEST= test.lua
all: test
test: $T
$(LUABIN)/lua $(TEST)
o: $(MYLIB).o
so: $T
$T: $(OBJS)
$(MAKESO) -o $@ $(OBJS) $(GDBMLIB)
clean:
rm -f $(OBJS) $T core core.* test.gdbm
doc:
@echo "$(MYNAME) library:"
@fgrep '/**' $(MYLIB).c | cut -f2 -d/ | tr -d '*' | sort | column
# distribution
FTP= www:www/ftp/lua/5.1
F= http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.1/$A
D= $(MYNAME)
A= $(MYLIB).tar.gz
TOTAR= Makefile,README,$(MYLIB).c,test.lua
distr: clean
tar zcvf $A -C .. $D/{$(TOTAR)}
touch -r $A .stamp
scp -p $A $(FTP)
diff: clean
wget -q -N $F
tar zxf $A
diff $D .
# eof
Jump to Line
Something went wrong with that request. Please try again.