Makefile 512 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # Makefile to wrap cargo
  2. all:
  3. cargo build
  4. check:
  5. cargo test
  6. clean:
  7. cargo clean
  8. real-clean: clean
  9. $(RM) $(FILES_GZ)
  10. $(RM) $(FILES)
  11. dist:
  12. cargo package
  13. # Download data set files
  14. FILES := \
  15. train-images-idx3-ubyte \
  16. train-labels-idx1-ubyte \
  17. t10k-images-idx3-ubyte \
  18. t10k-labels-idx1-ubyte
  19. FILES_GZ := $(addsuffix .gz,$(FILES))
  20. $(FILES_GZ) :
  21. curl -s -O http://yann.lecun.com/exdb/mnist/$@
  22. $(FILES) : % : %.gz %.gz.sha256
  23. shasum -c $(addsuffix .sha256,$<)
  24. gunzip -k $<
  25. download: $(FILES)