contrib/package: unmask openvpn app, is not broken anymore
[project/luci.git] / Makefile
1 include build/config.mk
2
3 MODULES = contrib/* applications/* libs/* modules/* themes/* i18n/*
4
5 OS:=$(shell uname)
6 export OS
7
8 .PHONY: all build gccbuild luabuild clean host gcchost luahost hostcopy hostclean
9
10 all: build
11
12 build: gccbuild luabuild
13
14 gccbuild:
15         for i in $(MODULES); do make -C$$i compile; done
16
17 luabuild:
18         for i in $(MODULES); do make -C$$i luabuild; done
19
20 clean:
21         rm -rf docs
22         for i in $(MODULES); do make -C$$i clean; done
23
24
25 host: build hostcopy
26
27 gcchost: gccbuild hostcopy
28
29 luahost: luabuild hostcopy
30
31 hostcopy: 
32         mkdir -p host/tmp
33         for i in $(MODULES); do cp -pR $$i/dist/* host/ 2>/dev/null || true; done
34         for i in $(MODULES); do cp -pR $$i/hostfiles/* host/ 2>/dev/null || true; done
35         rm -f host/luci
36         ln -s .$(LUCI_MODULEDIR) host/luci
37         rm -rf /tmp/luci-* || true
38
39 hostenv: host ucidefaults
40
41 ucidefaults:
42         build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/bin/uci-defaults --exclude luci-freifunk-*"
43
44 runboa: hostenv
45         libs/sgi-webuci/host/buildconfig.sh $(realpath host) > host/etc/boa/boa.conf
46         build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host/usr/bin/boa) -c $(realpath host/etc/boa) -d"
47
48 runhttpd: hostenv
49         build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host/usr/bin/lucittpd) $(realpath host)/usr/lib/lucittpd/plugins"
50
51 runluci: runhttpd
52
53 runlua: hostenv
54         build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) lua
55
56 runshell: hostenv
57         build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) $$SHELL
58
59 hostclean: clean
60         rm -rf host
61
62 apidocs: hostenv
63         build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh host/luci/ docs"
64
65 uvldocs: hostenv
66         build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) \
67         "build/uvldoc $(realpath host) $(UVL_SCHEMEDIR) uvldocs $(DOCS)"
68
69 run:
70         #       make run is deprecated                          #
71         #       Please use:                                     #
72         #                                                       #
73         #       To run LuCI WebUI using LuCIttpd                #
74         #       make runhttpd                                   #
75         #                                                       #
76         #       To run LuCI WebUI using Boa/Webuci              #
77         #       make runboa                                     #
78         #                                                       #
79         #       To start a shell in the LuCI environment        #
80         #       make runshell                                   #
81         #                                                       #
82         #       To run Lua CLI in the LuCI environment          #
83         #       make runlua                                     #