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 modules/base 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 modules/base 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 cp $(realpath build)/luci.cgi $(realpath host)/www/cgi-bin/luci
65 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/usr/sbin/uhttpd -p 8080 -h $(realpath host)/www -f"
68 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua -i build/setup.lua"
71 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) $$SHELL
77 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh host/luci/ docs"
80 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh libs/nixio/ nixiodocs"
83 for L in $${LANGUAGE:-$$(find i18n/ -path 'i18n/*/luasrc/i18n/*' -name 'default.*.lua' | \
84 sed -e 's!.*/default\.\(.*\)\.lua!\1!')}; do \
85 build/i18n-lua2po.pl . $(realpath host)/po $$L; \
89 # make run is deprecated #
92 # To run LuCI WebUI using uhttpd #
95 # To start a shell in the LuCI environment #
98 # To run Lua CLI in the LuCI environment #