Rewrote host environment targets to work out of the box
[project/luci.git] / contrib / luaposix / Makefile
index 4f16b536254b8d7f95af5bbb0f2f2dc274f4c115..1d7744ee733ddbb15f7a7d9781dead17e1f4d49a 100644 (file)
@@ -1,7 +1,8 @@
 include ../../build/config.mk
+include ../../build/gccconfig.mk
 
-LUAPOSIX_VERSION = 5.1.2
-LUAPOSIX_SITE = http://luaforge.net/frs/download.php/3063/
+LUAPOSIX_VERSION = 5.1.3
+LUAPOSIX_SITE = http://luaforge.net/frs/download.php/3449/
 LUAPOSIX_DIR = luaposix-$(LUAPOSIX_VERSION)
 LUAPOSIX_FILE = $(LUAPOSIX_DIR).tar.gz
 LUAPOSIX_URL = $(LUAPOSIX_SITE)/$(LUAPOSIX_FILE)
@@ -9,6 +10,8 @@ LUAPOSIX_PATCHDIR = patches
 
 all: compile
 
+include ../../build/module.mk
+
 $(LUAPOSIX_FILE):
        wget -O $@ $(LUAPOSIX_URL) || rm -f $@
 
@@ -32,10 +35,13 @@ $(LUAPOSIX_DIR)/.patched: $(LUAPOSIX_DIR)/.prepared $(LUAPOSIX_PATCHDIR)/series
        touch $@
 
 compile: $(LUAPOSIX_DIR)/.patched
-       $(MAKE) -C $(LUAPOSIX_DIR) CC=$(CC) CFLAGS="$(CFLAGS)" OS="$(OS)"
-       mkdir -p dist/usr/lib/lua
-       cp $(LUAPOSIX_DIR)/posix.so dist/usr/lib/lua/
+       $(MAKE) -C $(LUAPOSIX_DIR) CC=$(CC) CFLAGS="$(CFLAGS) $(LUA_CFLAGS)" LDFLAGS="$(LDFLAGS) $(LUA_SHLIBS)" OS="$(OS)"
+       mkdir -p dist$(LUA_LIBRARYDIR)
+       cp $(LUAPOSIX_DIR)/posix.so dist$(LUA_LIBRARYDIR)
 
+luasource:
+luastrip:
+luacompile:
 compile-all: compile
 
 clean: