cgi-bin/Makefile
changeset 251 2de5931b723d
parent 241 c6c81629f54e
     1.1 --- a/cgi-bin/Makefile	Fri May 02 14:42:18 2008 +0200
     1.2 +++ b/cgi-bin/Makefile	Fri Oct 24 01:35:27 2008 +0200
     1.3 @@ -4,7 +4,9 @@
     1.4  #DEBUG = -g
     1.5  OPT = -O2
     1.6  
     1.7 -INSTPATH ?= /usr/local/lib/lua/5.1
     1.8 +LUA_LIB ?= /usr/local/lib/lua/5.1
     1.9 +LUA_SHARE ?= /usr/local/share/lua/5.1
    1.10 +LUA_MODULES = tek/lib/luahtml.so tek/lib/posix.so
    1.11  
    1.12  help:
    1.13  	@echo
    1.14 @@ -12,7 +14,7 @@
    1.15  	@echo "-------------------------------------------------------------------------------"
    1.16  	@echo "help .......... This help"
    1.17  	@echo "modules ....... Build modules"
    1.18 -	@echo "install ....... Install modules [INSTPATH: $(INSTPATH)]"
    1.19 +	@echo "install ....... Install modules [LUA_SHARE: $(LUA_SHARE)]"
    1.20  	@echo
    1.21  	@echo "fastcgi-run ... Run as FastCGI external server"
    1.22  	@echo "                See loona_fastcgi.lua for configuration options"
    1.23 @@ -24,36 +26,38 @@
    1.24  .c.o:
    1.25  	$(CC) $(INCL) $(WARN) $(DEBUG) $(OPT) -fPIC -DPIC -c $? -o $@
    1.26  
    1.27 -modules: tek/lib/luahtml.so tek/os/posix.so
    1.28 +modules: $(LUA_MODULES)
    1.29  
    1.30  all: modules
    1.31  
    1.32 -install: tek/lib/luahtml.so tek/os/posix.so
    1.33 -	-install -d $(INSTPATH)/tek/app $(INSTPATH)/tek/lib $(INSTPATH)/tek/os
    1.34 -	-install -d $(INSTPATH)/tek/class/cgi $(INSTPATH)/tek/class/loona
    1.35 -	-install -s tek/lib/*.so $(INSTPATH)/tek/lib
    1.36 -	-install -s tek/os/*.so $(INSTPATH)/tek/os
    1.37 -	-luac -s -o $(INSTPATH)/tek/lib.lua tek/lib.lua
    1.38 -	-luac -s -o $(INSTPATH)/tek/lib/debug.lua tek/lib/debug.lua
    1.39 -	-luac -s -o $(INSTPATH)/tek/app/loona.lua tek/app/loona.lua
    1.40 -	-luac -s -o $(INSTPATH)/tek/class.lua tek/class.lua
    1.41 -	-luac -s -o $(INSTPATH)/tek/class/cgi.lua tek/class/cgi.lua
    1.42 -	-luac -s -o $(INSTPATH)/tek/class/fastcgi.lua tek/class/fastcgi.lua
    1.43 -	-luac -s -o $(INSTPATH)/tek/class/cgi/post.lua tek/class/cgi/post.lua
    1.44 -	-luac -s -o $(INSTPATH)/tek/class/cgi/request.lua tek/class/cgi/request.lua
    1.45 -	-luac -s -o $(INSTPATH)/tek/class/loona.lua tek/class/loona.lua
    1.46 -	-luac -s -o $(INSTPATH)/tek/class/loona/buffer.lua tek/class/loona/buffer.lua
    1.47 -	-luac -s -o $(INSTPATH)/tek/class/markup.lua tek/class/markup.lua
    1.48 -	-luac -s -o $(INSTPATH)/tek/class/loona/util.lua tek/class/loona/util.lua
    1.49 +install: $(LUA_MODULES)
    1.50 +	-install -d $(LUA_LIB)/tek/lib
    1.51 +	-install -d $(LUA_SHARE)/tek/app
    1.52 +	-install -d $(LUA_SHARE)/tek/lib
    1.53 +	-install -d $(LUA_SHARE)/tek/class/cgi
    1.54 +	-install -d $(LUA_SHARE)/tek/class/loona
    1.55 +	-install -s tek/lib/posix.so tek/lib/luahtml.so $(LUA_LIB)/tek/lib
    1.56 +	-luac -s -o $(LUA_SHARE)/tek/lib.lua tek/lib.lua
    1.57 +	-luac -s -o $(LUA_SHARE)/tek/lib/debug.lua tek/lib/debug.lua
    1.58 +	-luac -s -o $(LUA_SHARE)/tek/app/loona.lua tek/app/loona.lua
    1.59 +	-luac -s -o $(LUA_SHARE)/tek/class.lua tek/class.lua
    1.60 +	-luac -s -o $(LUA_SHARE)/tek/class/cgi.lua tek/class/cgi.lua
    1.61 +	-luac -s -o $(LUA_SHARE)/tek/class/fastcgi.lua tek/class/fastcgi.lua
    1.62 +	-luac -s -o $(LUA_SHARE)/tek/class/cgi/post.lua tek/class/cgi/post.lua
    1.63 +	-luac -s -o $(LUA_SHARE)/tek/class/cgi/request.lua tek/class/cgi/request.lua
    1.64 +	-luac -s -o $(LUA_SHARE)/tek/class/loona.lua tek/class/loona.lua
    1.65 +	-luac -s -o $(LUA_SHARE)/tek/class/loona/buffer.lua tek/class/loona/buffer.lua
    1.66 +	-luac -s -o $(LUA_SHARE)/tek/class/markup.lua tek/class/markup.lua
    1.67 +	-luac -s -o $(LUA_SHARE)/tek/class/loona/util.lua tek/class/loona/util.lua
    1.68  
    1.69  tek/lib/luahtml.so: tek/lib/luahtml.o
    1.70  	$(CC) $^ -shared -o $@ $(LIBS)
    1.71  
    1.72 -tek/os/posix.so: tek/os/posix.o
    1.73 +tek/lib/posix.so: tek/lib/posix.o
    1.74  	$(CC) $^ -shared -o $@ $(LIBS)
    1.75  
    1.76  clean:
    1.77 -	-rm tek/lib/*.so tek/lib/*.o tek/os/*.so tek/os/*.o
    1.78 +	-rm tek/lib/*.so tek/lib/*.o
    1.79  
    1.80  fastcgi-run:
    1.81  	./loona_fastcgi.lua