summaryrefslogtreecommitdiffhomepage
path: root/contrib/uci/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/uci/Makefile
parentf94c7b2c10d11d343c464be707e12c5754728b06 (diff)
Rewrote host environment targets to work out of the box
Diffstat (limited to 'contrib/uci/Makefile')
-rw-r--r--contrib/uci/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/uci/Makefile b/contrib/uci/Makefile
new file mode 100644
index 000000000..d3f8403c2
--- /dev/null
+++ b/contrib/uci/Makefile
@@ -0,0 +1,33 @@
+include ../../build/config.mk
+include ../../build/gccconfig.mk
+
+UCI_VERSION = 0.4.4
+UCI_SITE = http://mirror2.openwrt.org/sources
+UCI_DIR = uci-$(UCI_VERSION)
+UCI_FILE = $(UCI_DIR).tar.gz
+UCI_URL = $(UCI_SITE)/$(UCI_FILE)
+
+all: compile
+
+include ../../build/module.mk
+
+$(UCI_FILE):
+ wget -O $@ $(UCI_URL) || rm -f $@
+
+$(UCI_DIR)/.prepared: $(UCI_FILE)
+ rm -rf $(UCI_DIR)
+ tar xvfz $(UCI_FILE)
+ touch $@
+
+compile: $(UCI_DIR)/.prepared
+ $(MAKE) -C $(UCI_DIR) CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS="$(OS)"
+ mkdir -p dist/usr/lib dist/usr/bin
+ $(MAKE) -C $(UCI_DIR) install DESTDIR=../dist prefix=/usr
+ $(MAKE) -C $(UCI_DIR)/lua CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS="$(OS)"
+ $(MAKE) -C $(UCI_DIR)/lua install DESTDIR=../../dist luadir=$(LUA_LIBRARYDIR)
+
+
+compile-all: compile
+
+clean:
+ rm -rf $(UCI_DIR) $(UCI_FILE)