summaryrefslogtreecommitdiffhomepage
path: root/build/module.mk
blob: 923caad70c4ac86a7d10712b468d85c45fd989cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.PHONY: all compile compile-module source source-module clean clean-module

all: compile
compile: source-module
compile-all: compile-module
clean: clean-module
source: source-module

source-module:
	mkdir -p dist$(LUCI_INSTALLDIR)
	cp root/* dist -R 2>/dev/null || true
	cp luasrc/* dist$(LUCI_INSTALLDIR) -R 2>/dev/null || true
	for i in $$(find dist -name .svn); do rm $$i -rf; done  
	
compile-module: source-module
	for i in $$(find dist -name *.lua -not -name debug.lua); do $(LUAC) $(LUAC_OPTIONS) -o $$i $$i; done

clean-module:
	rm -rf dist