summaryrefslogtreecommitdiffhomepage
path: root/contrib/luasocket/Makefile
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-07-24 13:55:11 +0000
committerSteven Barth <steven@midlink.org>2008-07-24 13:55:11 +0000
commit7384e0e6b77518efa4d113ede46f8c107de6f604 (patch)
treeabe961b734c865ce3965f45585528c1ff39b94bd /contrib/luasocket/Makefile
parentf94c7b2c10d11d343c464be707e12c5754728b06 (diff)
Rewrote host environment targets to work out of the box
Diffstat (limited to 'contrib/luasocket/Makefile')
-rw-r--r--contrib/luasocket/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/luasocket/Makefile b/contrib/luasocket/Makefile
new file mode 100644
index 0000000000..2e187e2e5b
--- /dev/null
+++ b/contrib/luasocket/Makefile
@@ -0,0 +1,32 @@
+include ../../build/config.mk
+include ../../build/gccconfig.mk
+
+LUASOCKET_VERSION = 2.0.2
+LUASOCKET_SITE = http://luaforge.net/frs/download.php/2664/
+LUASOCKET_DIR = luasocket-$(LUASOCKET_VERSION)
+LUASOCKET_FILE = $(LUASOCKET_DIR).tar.gz
+LUASOCKET_URL = $(LUASOCKET_SITE)/$(LUASOCKET_FILE)
+INSTALL_MODULEDIR = dist$(LUA_MODULEDIR)
+INSTALL_LIBRARYDIR = dist$(LUA_LIBRARYDIR)
+
+all: compile
+
+include ../../build/module.mk
+
+$(LUASOCKET_FILE):
+ wget -O $@ $(LUASOCKET_URL) || rm -f $@
+
+$(LUASOCKET_DIR)/.prepared: $(LUASOCKET_FILE)
+ rm -rf $(LUASOCKET_DIR)
+ tar xvfz $(LUASOCKET_FILE)
+ touch $@
+
+compile: $(LUASOCKET_DIR)/.prepared
+ $(MAKE) -C $(LUASOCKET_DIR) CC=$(CC) CFLAGS="$(CFLAGS) $(LUA_CFLAGS) $(FPIC)" LDFLAGS="$(LDFLAGS) $(LUA_SHLIBS) $(SHLIB_FLAGS)" OS="$(OS)"
+ mkdir -p $(INSTALL_LIBRARYDIR) $(INSTALL_MODULEDIR)
+ $(MAKE) -C $(LUASOCKET_DIR) install INSTALL_TOP_SHARE=../../$(INSTALL_MODULEDIR) INSTALL_TOP_LIB=../../$(INSTALL_LIBRARYDIR)
+
+compile-all: compile
+
+clean:
+ rm -rf $(LUASOCKET_DIR) $(LUASOCKET_FILE)