2018-08-20 11:21:58 +02:00
|
|
|
BUILDDIR = ../build/apps
|
|
|
|
|
2018-08-28 14:49:03 +02:00
|
|
|
copyfiles = router.lua controllers logs views models
|
|
|
|
coffees = assets/coffee/bootstrap.coffee \
|
|
|
|
assets/coffee/BaseObject.coffee \
|
|
|
|
assets/coffee/APIManager.coffee \
|
|
|
|
assets/coffee/MarkOn.coffee \
|
2018-09-17 19:43:24 +02:00
|
|
|
assets/coffee/WVNC.coffee
|
2018-08-28 14:49:03 +02:00
|
|
|
|
2018-09-21 01:34:44 +02:00
|
|
|
SED=sed
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
SED=gsed
|
|
|
|
endif
|
|
|
|
|
2018-08-28 14:49:03 +02:00
|
|
|
main: js
|
|
|
|
- mkdir -p $(BUILDDIR)/assets
|
2018-08-20 11:21:58 +02:00
|
|
|
cp -rf $(copyfiles) $(BUILDDIR)
|
2018-08-28 14:49:03 +02:00
|
|
|
cp -r assets/css assets/scripts $(BUILDDIR)/assets
|
2018-08-20 11:21:58 +02:00
|
|
|
- cd $(BUILDDIR) && ln -s ../grs ./rst
|
2018-08-28 14:49:03 +02:00
|
|
|
|
|
|
|
js:
|
2018-09-18 19:53:00 +02:00
|
|
|
- rm assets/scripts/main.*
|
2018-08-28 14:49:03 +02:00
|
|
|
for f in $(coffees); do (cat "$${f}"; echo) >> assets/scripts/main.coffee; done
|
|
|
|
coffee --compile assets/scripts/main.coffee
|
2018-09-20 20:02:22 +02:00
|
|
|
coffee --compile assets/coffee/decoder.coffee
|
2018-09-21 01:34:44 +02:00
|
|
|
$(SED) '2d' assets/coffee/decoder.js > assets/scripts/tmp.js
|
|
|
|
$(SED) '$$ d' assets/scripts/tmp.js > assets/scripts/decoder.js
|
2018-09-20 20:02:22 +02:00
|
|
|
-rm assets/coffee/decoder.js
|
|
|
|
-rm assets/scripts/tmp.js
|
2018-09-17 19:43:24 +02:00
|
|
|
-rm assets/scripts/main.coffee
|
2018-08-28 14:49:03 +02:00
|
|
|
|
2018-08-20 11:21:58 +02:00
|
|
|
clean:
|
|
|
|
rm -rf $(BUILDDIR)/*
|