* Disable Boa gunzip support
[project/luci.git] / libs / sgi-webuci / Makefile
1 include ../../build/config.mk
2 include ../../build/gccconfig.mk
3 include ../../build/module.mk
4
5 BOA_VERSION = 0.94.14rc21
6 BOA_SITE = http://www.boa.org
7 BOA_DIR = boa-$(BOA_VERSION)
8 BOA_FILE = $(BOA_DIR).tar.gz
9 BOA_URL = $(BOA_SITE)/$(BOA_FILE)
10 BOA_PATCHDIR = boa-patches
11
12 $(BOA_FILE):
13 wget -O $@ $(BOA_URL) || rm -f $@
14
15 $(BOA_PATCHDIR)/series:
16 (cd $(BOA_PATCHDIR); ls *.patch | sort > series)
17
18 $(BOA_DIR)/.prepared: $(BOA_FILE)
19 rm -rf $(BOA_DIR)
20 tar xvfz $(BOA_FILE)
21 ln -s ../$(BOA_PATCHDIR) $(BOA_DIR)/patches
22 touch $@
23
24 $(BOA_DIR)/.patched: $(BOA_DIR)/.prepared $(BOA_PATCHDIR)/series
25 (cd $(BOA_DIR); \
26 if [ -x "$$(which quilt 2>/dev/null)" ]; then \
27 quilt push -a; \
28 else \
29 cat patches/*.patch | patch -p1; \
30 fi; \
31 )
32 touch $@
33
34 $(BOA_DIR)/.configured: $(BOA_DIR)/.patched
35 (cd $(BOA_DIR); ./configure --disable-debug --disable-gunzip)
36 touch $@
37
38 boa-compile: $(BOA_DIR)/.configured
39 $(MAKE) -C $(BOA_DIR)/src CC=$(CC) CFLAGS="$(CFLAGS)"
40
41 %.o: %.c
42 $(COMPILE) $(LUA_CFLAGS) -I$(BOA_DIR)/src $(FPIC) -c -o $@ $<
43
44 compile: boa-compile src/luci.o src/cgi.o
45 mkdir -p dist/usr/bin dist/usr/lib/boa
46 cp $(BOA_DIR)/src/boa $(BOA_DIR)/src/boa_indexer dist/usr/bin
47 $(LINK) $(SHLIB_FLAGS) -o dist/usr/lib/boa/luci.so src/luci.o src/cgi.o $(LUA_LIBS)
48
49 clean:
50 rm -rf $(BOA_DIR) $(BOA_FILE)
51 rm -f boa-patches/series
52 rm -f src/*.o