2008-05-08 15:37:41 +00:00
|
|
|
include build/config.mk
|
|
|
|
|
2008-07-24 13:55:11 +00:00
|
|
|
MODULES = applications/* libs/* modules/* themes/* i18n/* contrib/*
|
2008-05-28 19:37:43 +00:00
|
|
|
|
2008-05-28 15:28:13 +00:00
|
|
|
OS:=$(shell uname)
|
|
|
|
export OS
|
2008-05-28 19:37:43 +00:00
|
|
|
|
|
|
|
.PHONY: all build gccbuild luabuild clean host gcchost luahost hostcopy hostclean
|
2008-05-08 15:37:41 +00:00
|
|
|
|
|
|
|
all: build
|
|
|
|
|
2008-07-24 13:55:11 +00:00
|
|
|
build: gccbuild luabuild
|
2008-05-28 19:37:43 +00:00
|
|
|
|
|
|
|
gccbuild:
|
|
|
|
for i in $(MODULES); do make -C$$i compile; done
|
|
|
|
|
|
|
|
luabuild:
|
2008-08-15 15:50:43 +00:00
|
|
|
for i in $(MODULES); do make -C$$i luabuild; done
|
2008-05-08 15:37:41 +00:00
|
|
|
|
|
|
|
clean:
|
2008-07-29 21:16:12 +00:00
|
|
|
rm -rf docs
|
2008-05-08 15:37:41 +00:00
|
|
|
for i in $(MODULES); do make -C$$i clean; done
|
|
|
|
|
2008-05-28 19:37:43 +00:00
|
|
|
|
|
|
|
host: build hostcopy
|
|
|
|
|
|
|
|
gcchost: gccbuild hostcopy
|
|
|
|
|
|
|
|
luahost: luabuild hostcopy
|
|
|
|
|
|
|
|
hostcopy:
|
2008-09-16 19:51:11 +00:00
|
|
|
mkdir -p host/tmp
|
2008-09-24 22:02:51 +00:00
|
|
|
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
|
2008-06-02 15:34:59 +00:00
|
|
|
rm -f host/luci
|
2008-06-14 14:12:12 +00:00
|
|
|
ln -s .$(LUCI_MODULEDIR) host/luci
|
2008-09-15 17:03:04 +00:00
|
|
|
rm -rf /tmp/luci-* || true
|
2008-06-02 15:34:26 +00:00
|
|
|
|
2008-07-24 13:55:11 +00:00
|
|
|
hostenv: host ucidefaults
|
|
|
|
|
|
|
|
ucidefaults:
|
|
|
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/bin/uci-defaults --exclude luci-community-*"
|
|
|
|
|
|
|
|
runboa: hostenv
|
|
|
|
libs/sgi-webuci/host/buildconfig.sh $(realpath host) > host/etc/boa/boa.conf
|
|
|
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host/usr/bin/boa) -c $(realpath host/etc/boa) -d"
|
|
|
|
|
|
|
|
runhttpd: hostenv
|
|
|
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath libs/httpd/host/runluci) $(realpath host) $(HTDOCS)"
|
2008-06-02 15:34:26 +00:00
|
|
|
|
2008-06-23 18:17:02 +00:00
|
|
|
runluci: luahost
|
2008-07-24 13:55:11 +00:00
|
|
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath libs/httpd/host/runluci) $(realpath host) $(HTDOCS)"
|
|
|
|
|
|
|
|
runlua: hostenv
|
|
|
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) lua
|
|
|
|
|
|
|
|
runshell: hostenv
|
|
|
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) $$SHELL
|
2008-06-23 18:17:02 +00:00
|
|
|
|
2008-05-22 17:21:30 +00:00
|
|
|
hostclean: clean
|
2008-05-28 19:37:43 +00:00
|
|
|
rm -rf host
|
2008-06-23 18:17:02 +00:00
|
|
|
|
2008-07-29 21:16:12 +00:00
|
|
|
apidocs: hostenv
|
|
|
|
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh host/luci/ docs"
|
|
|
|
|
2008-06-23 18:17:02 +00:00
|
|
|
run:
|
2008-07-24 13:55:11 +00:00
|
|
|
# make run is deprecated #
|
|
|
|
# Please use: #
|
|
|
|
# #
|
|
|
|
# To run LuCI WebUI using LuCI HTTPD #
|
|
|
|
# make runhttpd #
|
|
|
|
# #
|
|
|
|
# To run LuCI WebUI using Boa/Webuci #
|
|
|
|
# make runboa #
|
|
|
|
# #
|
|
|
|
# To start a shell in the LuCI environment #
|
|
|
|
# make runshell #
|
|
|
|
# #
|
|
|
|
# To run Lua CLI in the LuCI environment #
|
|
|
|
# make runlua #
|