X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=Makefile;h=0e09682ae22bc57e6e3e815d039afcb310ff6c8b;hp=473d031fb0203eeaee2f056acbfe805154ce459f;hb=f154da7e8c21edd2bc55374e3cece0cf3dedfefe;hpb=e650f6bc5f959a6430ba09f819bd4ee284ae2dfd diff --git a/Makefile b/Makefile index 473d031fb..0e09682ae 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,46 @@ include build/config.mk -MODULES = applications/* core modules/* themes/* +MODULES = applications/* libs/* modules/* themes/* i18n/* LUA_TARGET = source +### luaposix merge (temporary) ### +OS:=$(shell uname) +export OS +ifeq ($(OS),Darwin) + MODULES += contrib/luaposix +endif -.PHONY: all build clean host hostclean + +.PHONY: all build gccbuild luabuild clean host gcchost luahost hostcopy hostclean all: build -build: - for i in $(MODULES); do make -C$$i $(LUA_TARGET); done +build: luabuild gccbuild + +gccbuild: + for i in $(MODULES); do make -C$$i compile; done + +luabuild: + for i in $(MODULES); do make -C$$i lua$(LUA_TARGET); done clean: for i in $(MODULES); do make -C$$i clean; done -host: build - mkdir -p host/ffluci - for i in $(MODULES); do cp $$i/dist$(LUCI_INSTALLDIR) host/ -R 2>/dev/null || true; done - -hostclean: - rm host -rf + +host: build hostcopy + +gcchost: gccbuild hostcopy + +luahost: luabuild hostcopy + +hostcopy: + mkdir -p host + for i in $(MODULES); do cp $$i/dist/* host/ -R 2>/dev/null || true; done + rm -f host/luci + ln -s .$(LUCI_INSTALLDIR) host/luci + +run: host + ./host/usr/bin/boa -c ./host/etc/boa -d + +hostclean: clean + rm -rf host