-host: build
- mkdir -p host
- for i in $(MODULES); do cp $$i/dist/* host/ -R 2>/dev/null || true; done
- ln -sf .$(LUCI_INSTALLDIR) host/luci
-
+
+host: build hostcopy
+
+gcchost: gccbuild hostcopy
+
+luahost: luabuild hostcopy
+
+hostcopy:
+ mkdir -p host/tmp
+ for i in $(MODULES); do cp -pR $$i/dist/* host/ 2>/dev/null || true; done
+ for i in $(MODULES); do cp -pR $$i/hostfiles/* host/ 2>/dev/null || true; done
+ rm -f host/luci
+ ln -s .$(LUCI_MODULEDIR) host/luci
+ rm -rf /tmp/luci-* || true
+
+hostenv: host ucidefaults
+
+ucidefaults:
+ build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/bin/uci-defaults --exclude luci-freifunk-*"
+
+runhttpd: hostenv
+ build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua build/lucid.lua"
+
+runlua: hostenv
+ build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua -i build/setup.lua"
+
+runshell: hostenv
+ build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) $$SHELL
+