* luci/applications: force success for postinstall scripts
[project/luci.git] / contrib / lpeg / Makefile
1 include ../../build/config.mk
2 include ../../build/gccconfig.mk
3
4 LPEG_VERSION = 0.8.1
5 LPEG_SITE = http://www.inf.puc-rio.br/~roberto/lpeg
6 LPEG_DIR = lpeg-$(LPEG_VERSION)
7 LPEG_FILE = $(LPEG_DIR).tar.gz
8 LPEG_URL = $(LPEG_SITE)/$(LPEG_FILE)
9
10 all: compile
11
12 include ../../build/module.mk
13
14 $(LPEG_FILE):
15         wget -O $@ $(LPEG_URL) || rm -f $@
16
17 $(LPEG_DIR)/.prepared: $(LPEG_FILE)
18         rm -rf $(LPEG_DIR)
19         tar xvfz $(LPEG_FILE)
20         touch $@
21
22 compile: $(LPEG_DIR)/.prepared
23         $(MAKE) -C $(LPEG_DIR) CC=$(CC) COPT="$(CFLAGS) $(LUA_CFLAGS) -fpic"
24         mkdir -p dist$(LUA_LIBRARYDIR)
25         cp $(LPEG_DIR)/{lpeg.so,re.lua} dist$(LUA_LIBRARYDIR)
26
27 luasource:
28 luastrip:
29 luacompile:
30 compile-all: compile
31
32 clean:
33         rm -rf $(LPEG_DIR) $(LPEG_FILE)