4 FILES = ffluci/debug.lua ffluci/view/*.htm ffluci/view/cbi/*.htm ffluci/i18n/*
6 CFILES = ffluci/util.lua ffluci/http.lua ffluci/fs.lua \
7 ffluci/sys.lua ffluci/model/uci.lua ffluci/model/ipkg.lua \
8 ffluci/config.lua ffluci/i18n.lua ffluci/template.lua \
9 ffluci/cbi.lua ffluci/dispatcher.lua ffluci/menu.lua ffluci/init.lua
11 DIRECTORIES = ffluci/model/cbi ffluci/model/menu ffluci/controller ffluci/i18n ffluci/view/cbi
13 OUTDIRS = $(DIRECTORIES:%=dist/%)
14 INFILES = $(CFILES:%=src/%)
15 OUTFILE = ffluci/init.lua
16 CPFILES = $(FILES:%=src/%)
18 .PHONY: all compile source depends clean
24 for i in $(CPFILES); do if [ -f "$$i" ]; then i=$$(echo $$i | cut -d/ -f2-); \
25 mkdir -p dist/$$(dirname $$i); cp src/$$i dist/$$i; fi; done
28 $(LUAC) $(LUAC_OPTIONS) -o dist/$(OUTFILE) $(INFILES)
29 for i in $(CFILES); do [ -f dist/$$i ] || ln -s `dirname $$i | cut -s -d / -f 2- | sed -e 's/[^/]*\/*/..\//g'``basename $(OUTFILE)` dist/$$i; done
33 for i in $(CFILES); do cp src/$$i dist/$$i; done