38e2d155222f67ec039af64b963c58cae059011d
[project/luci.git] / Makefile
1 include build/config.mk
2
3 MODULES = applications/* libs/* modules/* themes/* i18n/* contrib/luaposix
4 LUA_TARGET = source
5
6 OS:=$(shell uname)
7 export OS
8
9 .PHONY: all build gccbuild luabuild clean host gcchost luahost hostcopy hostclean
10
11 all: build
12
13 build: luabuild gccbuild
14
15 gccbuild:
16 for i in $(MODULES); do make -C$$i compile; done
17
18 luabuild:
19 for i in $(MODULES); do make -C$$i lua$(LUA_TARGET); done
20
21 clean:
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
33 for i in $(MODULES); do cp -a $$i/dist/* host/ -R 2>/dev/null || true; done
34 rm -f host/luci
35 ln -s .$(LUCI_INSTALLDIR) host/luci
36
37 run: host
38 ./host/usr/bin/boa -c ./host/etc/boa -d
39
40 hostclean: clean
41 rm -rf host