Add firewall configuration to dev environment
[project/luci.git] / contrib / uci / Makefile
1 include ../../build/config.mk
2 include ../../build/gccconfig.mk
3
4 UCI_VERSION = 0.4.8
5 UCI_SITE = http://mirror2.openwrt.org/sources
6 UCI_DIR = uci-$(UCI_VERSION)
7 UCI_FILE = $(UCI_DIR).tar.gz
8 UCI_URL = $(UCI_SITE)/$(UCI_FILE)
9
10 all: compile
11
12 include ../../build/module.mk
13
14 $(UCI_FILE):
15         wget -O $@ $(UCI_URL) || rm -f $@
16
17 $(UCI_DIR)/.prepared: $(UCI_FILE)
18         rm -rf $(UCI_DIR)
19         tar xvfz $(UCI_FILE)
20         touch $@
21
22 compile: $(UCI_DIR)/.prepared
23         $(MAKE) -C $(UCI_DIR) CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS="$(OS)"
24         mkdir -p dist/usr/lib dist/usr/bin
25         $(MAKE) -C $(UCI_DIR) install DESTDIR=../dist prefix=/usr
26         $(MAKE) -C $(UCI_DIR)/lua CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS="$(OS)"
27         $(MAKE) -C $(UCI_DIR)/lua install DESTDIR=../../dist luadir=$(LUA_LIBRARYDIR)
28
29
30 compile-all: compile
31
32 clean:
33         rm -rf $(UCI_DIR) $(UCI_FILE)