summaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-08-04 21:35:37 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-08-04 21:35:37 +0000
commit9a3d3b2787d65c547a8544c8e8e12c1290ee9cf0 (patch)
tree9787f474b8d7ad97ca3218200beb649b1ac61345 /contrib
parent3d1f9b05e9ff165f5ba74c46f167fb73dbbf5bc9 (diff)
* luci/contrib: packaged bitlib
Diffstat (limited to 'contrib')
-rw-r--r--contrib/bitlib/.gitignore1
-rw-r--r--contrib/bitlib/Makefile37
2 files changed, 38 insertions, 0 deletions
diff --git a/contrib/bitlib/.gitignore b/contrib/bitlib/.gitignore
new file mode 100644
index 000000000..7211268c8
--- /dev/null
+++ b/contrib/bitlib/.gitignore
@@ -0,0 +1 @@
+bitlib-*
diff --git a/contrib/bitlib/Makefile b/contrib/bitlib/Makefile
new file mode 100644
index 000000000..384414b5d
--- /dev/null
+++ b/contrib/bitlib/Makefile
@@ -0,0 +1,37 @@
+include ../../build/config.mk
+include ../../build/gccconfig.mk
+
+BITLIB_VERSION = 25
+BITLIB_SITE = http://luaforge.net/frs/download.php/3065/
+BITLIB_DIR = bitlib-$(BITLIB_VERSION)
+BITLIB_FILE = $(BITLIB_DIR).tar.gz
+BITLIB_URL = $(BITLIB_SITE)/$(BITLIB_FILE)
+
+all: compile
+
+include ../../build/module.mk
+
+$(BITLIB_FILE):
+ wget -O $@ $(BITLIB_URL) || rm -f $@
+
+$(BITLIB_DIR)/.prepared: $(BITLIB_FILE)
+ rm -rf $(BITLIB_DIR)
+ tar xvfz $(BITLIB_FILE)
+ touch $@
+
+$(BITLIB_DIR)/.configured: $(BITLIB_DIR)/.prepared
+ ( cd $(BITLIB_DIR); ./configure )
+ touch $@
+
+compile: $(BITLIB_DIR)/.configured
+ $(MAKE) -C $(BITLIB_DIR) CC=$(CC) CFLAGS="$(CFLAGS) $(LUA_CFLAGS)" LDFLAGS="$(LDFLAGS) $(LUA_SHLIBS)" OS="$(OS)"
+ mkdir -p dist$(LUA_LIBRARYDIR)
+ cp $(BITLIB_DIR)/.libs/bit.so.0.0.0 dist$(LUA_LIBRARYDIR)/bit.so
+
+luasource:
+luastrip:
+luacompile:
+compile-all: compile
+
+clean:
+ rm -rf $(BITLIB_DIR) $(BITLIB_FILE)