fix symlink creation
[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 rm -f host/luci
40 ln -s .$(LUCI_INSTALLDIR) host/luci
41
42 run: host
43 ./host/usr/bin/boa -c ./host/etc/boa -d
44
45 hostclean: clean
46 rm -rf host