c78f5a8108ae8c9fc36ef26917761a5f79133502
[project/luci.git] / Makefile
1 include build/config.mk
2
3 MODULES = applications/* libs/* modules/* themes/* i18n/*
4 LUA_TARGET = source
5
6 ### luaposix merge (temporary) ###
7 OS:=$(shell uname)
8 export OS
9 ifeq ($(OS),Darwin)
10 MODULES += contrib/luaposix
11 endif
12
13
14 .PHONY: all build gccbuild luabuild clean host gcchost luahost hostcopy hostclean
15
16 all: build
17
18 build: luabuild gccbuild
19
20 gccbuild:
21 for i in $(MODULES); do make -C$$i compile; done
22
23 luabuild:
24 for i in $(MODULES); do make -C$$i lua$(LUA_TARGET); done
25
26 clean:
27 for i in $(MODULES); do make -C$$i clean; done
28
29
30 host: build hostcopy
31
32 gcchost: gccbuild hostcopy
33
34 luahost: luabuild hostcopy
35
36 hostcopy:
37 mkdir -p host
38 for i in $(MODULES); do cp $$i/dist/* host/ -R 2>/dev/null || true; done
39 ln -sf .$(LUCI_INSTALLDIR) host/luci
40
41 hostclean: clean
42 rm -rf host