Squashed commit of the following:
[project/luci.git] / Makefile
index 32ef02d4e5c043409120b01cd0d8a9b49c460e82..d76be9a2de8b0b8b5838a7a4d4a738fca348bed0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,12 @@
 include build/config.mk
 
-MODULES = applications/* core modules/* themes/*
-LUA_TARGET = source
-
+MODULES = applications/* libs/* modules/* themes/* i18n/*
+LUA_TARGET = compile
+OS:=$(shell uname)
+export OS
+ifeq ($(OS),Darwin)
+  MODULES += contrib/luaposix
+endif
 
 .PHONY: all build clean host hostclean
 
@@ -15,8 +19,9 @@ clean:
        for i in $(MODULES); do make -C$$i clean; done
 
 host: build
-       mkdir -p host/luci
-       for i in $(MODULES); do cp $$i/dist$(LUCI_INSTALLDIR) host/ -R 2>/dev/null || true; done
+       mkdir -p host
+       for i in $(MODULES); do cp $$i/dist/* host/ -R 2>/dev/null || true; done
+       ln -sf .$(LUCI_INSTALLDIR) host/luci
        
 hostclean: clean
        rm host -rf