modules/admin-full: use crypto mode "wep-open" instead of just "wep" in connection...
[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 make -C libs/lmo CC="cc" CFLAGS="" LDFLAGS="" SDK="$(shell test -f .running-sdk && echo 1)" host-install
16 for i in $(MODULES); do \
17 make -C$$i SDK="$(shell test -f .running-sdk && echo 1)" compile || { \
18 echo "*** Compilation of $$i failed!"; \
19 exit 1; \
20 }; \
21 done
22
23 luabuild: i18nbuild
24 for i in $(MODULES); do HOST=$(realpath host) \
25 SDK="$(shell test -f .running-sdk && echo 1)" make -C$$i luabuild; done
26
27 i18nbuild:
28 mkdir -p host/lua-po
29 ./build/i18n-po2lua.pl ./po host/lua-po
30
31 clean:
32 rm -f .running-sdk
33 rm -rf docs
34 make -C libs/lmo host-clean
35 for i in $(MODULES); do make -C$$i clean; done
36
37
38 host: build hostcopy
39
40 gcchost: gccbuild hostcopy
41
42 luahost: luabuild hostcopy
43
44 hostcopy:
45 mkdir -p host/tmp
46 mkdir -p host/var/state
47 for i in $(MODULES); do cp -pR $$i/dist/* host/ 2>/dev/null || true; done
48 for i in $(MODULES); do cp -pR $$i/hostfiles/* host/ 2>/dev/null || true; done
49 rm -f host/luci
50 ln -s .$(LUCI_MODULEDIR) host/luci
51 rm -rf /tmp/luci-* || true
52
53 hostenv: sdk host ucidefaults
54
55 sdk:
56 touch .running-sdk
57
58 ucidefaults:
59 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/bin/uci-defaults --exclude luci-freifunk-*"
60
61 runhttpd: hostenv
62 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua build/lucid.lua"
63
64 runuhttpd: hostenv
65 cp $(realpath build)/luci.cgi $(realpath host)/www/cgi-bin/luci
66 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/usr/sbin/uhttpd -p 8080 -h $(realpath host)/www -f"
67
68 runlua: hostenv
69 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua -i build/setup.lua"
70
71 runshell: hostenv
72 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) $$SHELL
73
74 hostclean: clean
75 rm -rf host
76
77 apidocs: hostenv
78 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh host/luci/ docs"
79
80 nixiodocs: hostenv
81 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh libs/nixio/ nixiodocs"
82
83 po: host
84 for L in $${LANGUAGE:-$$(find i18n/ -path 'i18n/*/luasrc/i18n/*' -name 'default.*.lua' | \
85 sed -e 's!.*/default\.\(.*\)\.lua!\1!')}; do \
86 build/i18n-lua2po.pl . $(realpath host)/po $$L; \
87 done
88
89 run:
90 # make run is deprecated #
91 # Please use: #
92 # #
93 # To run LuCI WebUI using LuCIttpd #
94 # make runhttpd #
95 # #
96 # To run LuCI WebUI using Boa/Webuci #
97 # make runboa #
98 # #
99 # To start a shell in the LuCI environment #
100 # make runshell #
101 # #
102 # To run Lua CLI in the LuCI environment #
103 # make runlua #