1# makefile for ascii85 library for Lua 2 3# change these to reflect your Lua installation 4LUA= /tmp/lhf/lua-5.3.3 5LUAINC= $(LUA)/src 6LUALIB= $(LUA)/src 7LUABIN= $(LUA)/src 8 9# these will probably work if Lua has been installed globally 10#LUA= /usr/local 11#LUAINC= $(LUA)/include 12#LUALIB= $(LUA)/lib 13#LUABIN= $(LUA)/bin 14 15# probably no need to change anything below here 16CC= gcc -std=c99 17CFLAGS= $(INCS) $(WARN) -O2 $G 18WARN= -pedantic -Wall -Wextra 19INCS= -I$(LUAINC) 20MAKESO= $(CC) -shared 21#MAKESO= $(CC) -bundle -undefined dynamic_lookup 22 23MYNAME= ascii85 24MYLIB= l$(MYNAME) 25T= $(MYNAME).so 26OBJS= $(MYLIB).o 27TEST= test.lua 28 29all: test 30 31test: $T 32 $(LUABIN)/lua $(TEST) 33 34o: $(MYLIB).o 35 36so: $T 37 38$T: $(OBJS) 39 $(MAKESO) -o $@ $(OBJS) 40 41clean: 42 rm -f $(OBJS) $T core core.* 43 44doc: 45 @echo "$(MYNAME) library:" 46 @fgrep '/**' $(MYLIB).c | cut -f2 -d/ | tr -d '*' | sort | column 47 48# eof 49