Makefile 663 B

123456789101112131415161718192021222324
  1. CPP = /usr/bin/cpp -P -undef -Wundef -std=c99 -nostdinc -Wtrigraphs -fdollars-in-identifiers -C -Wno-invalid-pp-token
  2. SRC = $(shell find web/assets -maxdepth 1 -type f)
  3. DST = $(subst web/assets,.build/assets,$(SRC))
  4. ALL: web/bindata.go
  5. .build/bin/go-bindata:
  6. GOPATH=$(shell pwd)/.build go get github.com/jteeuwen/go-bindata/...
  7. .build/assets:
  8. mkdir -p $@
  9. .build/assets/%.js: web/assets/%.js
  10. $(CPP) $< | closure-compiler --js_output_file $@
  11. .build/assets/%: web/assets/%
  12. cp $< $@
  13. web/bindata.go: .build/bin/go-bindata .build/assets $(DST)
  14. $< -o $@ -pkg web -prefix .build/assets -nomemcopy .build/assets/...
  15. clean:
  16. rm -rf .build/assets web/bindata.go