1 include ../../build/config.mk
2 include ../../build/gccconfig.mk
4 LUAPOSIX_VERSION = 5.1.2
5 LUAPOSIX_SITE = http://luaforge.net/frs/download.php/3063/
6 LUAPOSIX_DIR = luaposix-$(LUAPOSIX_VERSION)
7 LUAPOSIX_FILE = $(LUAPOSIX_DIR).tar.gz
8 LUAPOSIX_URL = $(LUAPOSIX_SITE)/$(LUAPOSIX_FILE)
9 LUAPOSIX_PATCHDIR = patches
14 wget -O $@ $(LUAPOSIX_URL) || rm -f $@
16 $(LUAPOSIX_PATCHDIR)/series:
17 (cd $(LUAPOSIX_PATCHDIR); ls *.patch | sort > series)
19 $(LUAPOSIX_DIR)/.prepared: $(LUAPOSIX_FILE)
20 rm -rf $(LUAPOSIX_DIR)
21 tar xvfz $(LUAPOSIX_FILE)
22 ln -s ../$(LUAPOSIX_PATCHDIR) $(LUAPOSIX_DIR)/patches
25 $(LUAPOSIX_DIR)/.patched: $(LUAPOSIX_DIR)/.prepared $(LUAPOSIX_PATCHDIR)/series
26 (cd $(LUAPOSIX_DIR); \
27 if [ -x "$$(which quilt 2>/dev/null)" ]; then \
30 cat patches/*.patch | patch -p1; \
35 compile: $(LUAPOSIX_DIR)/.patched
36 $(MAKE) -C $(LUAPOSIX_DIR) CC=$(CC) CFLAGS="$(CFLAGS) $(LUA_CFLAGS)" LDFLAGS="$(LDFLAGS) $(LUA_SHLIBS)" OS="$(OS)"
37 mkdir -p dist$(LUA_LIBRARYDIR)
38 cp $(LUAPOSIX_DIR)/posix.so dist$(LUA_LIBRARYDIR)
44 rm -rf $(LUAPOSIX_DIR) $(LUAPOSIX_FILE)
45 rm -f $(LUAPOSIX_PATCHDIR)/series