Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
58 lines (41 sloc) 906 Bytes
# makefile for random library for Lua
# change these to reflect your Lua installation
LUA= /tmp/lhf/lua-5.0
LUAINC= $(LUA)/include
LUALIB= $(LUA)/lib
LUABIN= $(LUA)/bin
# no need to change anything below here
CFLAGS= $(INCS) $(WARN) -O2 $G
WARN= -ansi -pedantic -Wall
INCS= -I$(LUAINC)
MYNAME= v3
MYLIB= l$(MYNAME)
T= $(MYLIB).so
OBJS= $(MYLIB).o
TEST= test.lua
all: test
test: $T
$(LUABIN)/lua -l$(MYNAME) $(TEST)
o: $(MYLIB).o
so: $T
$T: $(OBJS)
$(CC) -o $@ -shared $(OBJS)
clean:
rm -f $(OBJS) $T core core.* a.out
doc:
@echo "$(MYNAME) library:"
@fgrep '/**' $(MYLIB).c | cut -f2 -d/ | tr -d '*' | sort | column
# distribution
FTP= $(HOME)/public/ftp/lua
D= $(MYNAME)
A= $(MYLIB).tar.gz
TOTAR= Makefile,README,$(MYLIB).c,$(MYNAME).lua,test.lua
tar: clean
tar zcvf $A -C .. $D/{$(TOTAR)}
distr: tar
touch -r $A .stamp
mv $A $(FTP)
diff: clean
tar zxf $(FTP)/$A
diff $D .
# eof
Jump to Line
Something went wrong with that request. Please try again.