1 include build/config.mk
3 MODULES = contrib/* applications/* libs/* modules/* themes/* i18n/*
6 MODULES:=$(foreach item,$(wildcard $(MODULES)),$(if $(realpath $(wildcard $(item)/Makefile)),$(item)))
10 .PHONY: all build gccbuild luabuild clean host gcchost luahost hostcopy hostclean
14 build: gccbuild luabuild
17 make -C libs/web CC="cc" CFLAGS="" LDFLAGS="" SDK="$(shell test -f .running-sdk && echo 1)" host-install
18 for i in $(MODULES); do \
19 make -C$$i SDK="$(shell test -f .running-sdk && echo 1)" compile || { \
20 echo "*** Compilation of $$i failed!"; \
26 for i in $(MODULES); do HOST=$(realpath host) \
27 SDK="$(shell test -f .running-sdk && echo 1)" make -C$$i luabuild; done
31 ./build/i18n-po2lua.pl ./po host/lua-po
36 make -C libs/web host-clean
37 for i in $(MODULES); do make -C$$i clean; done
42 gcchost: gccbuild hostcopy
44 luahost: luabuild hostcopy
48 mkdir -p host/var/state
49 for i in $(MODULES); do cp -pR $$i/dist/* host/ 2>/dev/null || true; done
50 for i in $(MODULES); do cp -pR $$i/hostfiles/* host/ 2>/dev/null || true; done
52 ln -s .$(LUCI_MODULEDIR) host/luci
53 rm -rf /tmp/luci-* || true
55 hostenv: sdk host ucidefaults
61 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/bin/uci-defaults --exclude luci-freifunk-*"
64 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua build/lucid.lua"
67 cp $(realpath build)/luci.cgi $(realpath host)/www/cgi-bin/luci
68 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/usr/sbin/uhttpd -p 8080 -h $(realpath host)/www -f"
71 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua -i build/setup.lua"
74 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) $$SHELL
80 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh host/luci/ docs"
83 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh libs/nixio/ nixiodocs"
86 for L in $${LANGUAGE:-$$(find i18n/ -path 'i18n/*/luasrc/i18n/*' -name 'default.*.lua' | \
87 sed -e 's!.*/default\.\(.*\)\.lua!\1!')}; do \
88 build/i18n-lua2po.pl . $(realpath host)/po $$L; \
92 # make run is deprecated #
95 # To run LuCI WebUI using LuCIttpd #
98 # To run LuCI WebUI using Boa/Webuci #
101 # To start a shell in the LuCI environment #
104 # To run Lua CLI in the LuCI environment #