Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. ##
  2. # Toplevel Makefile MSP40 hardware UART
  3. #
  4. # Stefan Wendler, sw@kaltpost.de
  5. ##
  6. BASEDIR = .
  7. SRCDIR = src
  8. DEPLOYDIR = deploy
  9. TMPDIR = /tmp
  10. VERSION = 0.1
  11. TARGET = msp430_harduart_v$(VERSION)
  12. all: target
  13. world: target gen-docs
  14. target:
  15. make -C $(SRCDIR)
  16. gen-docs: target
  17. cd $(SRCDIR) && make gen-docs
  18. style:
  19. cd $(SRCDIR) && make style
  20. check:
  21. make -C $(SRCDIR) check
  22. deploy-src: target check style clean gen-docs
  23. rm -fr $(TMPDIR)/$(TARGET)_src
  24. mkdir $(TMPDIR)/$(TARGET)_src
  25. cp -a ./* $(TMPDIR)/$(TARGET)_src/.
  26. rm -fr $(TMPDIR)/$(TARGET)_src/deploy
  27. rm -fr $(TMPDIR)/$(TARGET)_src/tools
  28. mkdir $(TMPDIR)/$(TARGET)_src/deploy
  29. (cd $(TMPDIR); tar --exclude=".svn" -jcvf $(TARGET)_src.tar.bz2 $(TARGET)_src)
  30. mv $(TMPDIR)/$(TARGET)_src.tar.bz2 $(DEPLOYDIR)/.
  31. deploy-bin: clean target
  32. rm -fr $(TMPDIR)/$(TARGET)_bin
  33. mkdir $(TMPDIR)/$(TARGET)_bin
  34. cp CHANGELOG LICENSE README $(TMPDIR)/$(TARGET)_bin/.
  35. cp -a ./bin $(TMPDIR)/$(TARGET)_bin/.
  36. cp -a ./doc $(TMPDIR)/$(TARGET)_bin/.
  37. (cd $(TMPDIR); tar --exclude=".svn" -jcvf $(TARGET)_bin.tar.bz2 $(TARGET)_bin)
  38. mv $(TMPDIR)/$(TARGET)_bin.tar.bz2 $(DEPLOYDIR)/.
  39. deploy: deploy-src deploy-bin
  40. flash-target: target
  41. mspdebug rf2500 "prog ./bin/firmware.elf"
  42. clean:
  43. make -C $(SRCDIR) clean
  44. rm -fr doc/gen
  45. rm -f bin/firmware.*