Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # ============
  2. # Main targets
  3. # ============
  4. # -------------
  5. # Configuration
  6. # -------------
  7. $(eval venvpath := .venv2)
  8. $(eval pip := $(venvpath)/bin/pip)
  9. $(eval python := $(venvpath)/bin/python)
  10. $(eval platformio := $(venvpath)/bin/platformio)
  11. # Setup Python virtualenv
  12. setup-virtualenv:
  13. @test -e $(python) || `command -v virtualenv` --python=python2 --no-site-packages $(venvpath)
  14. # ----------
  15. # PlatformIO
  16. # ----------
  17. install-platformio: setup-virtualenv
  18. @$(pip) install platformio --quiet
  19. build-all: install-platformio
  20. @$(platformio) run
  21. build-env: install-platformio
  22. @$(platformio) run --environment $(environment)
  23. # Note: This are legacy build targets, the new ones are defined through `platformio.ini`.
  24. ci-all: install-platformio
  25. # atmelavr
  26. $(platformio) ci --board=megaatmega2560 --lib="." examples/HX711_basic_example
  27. $(platformio) ci --board=megaatmega2560 --lib="." examples/HX711_timeout_example
  28. $(platformio) ci --board=megaatmega2560 --lib="." examples/HX711_full_example
  29. # atmelavr
  30. $(MAKE) ci-basic board=feather328p
  31. # espressif8266
  32. $(MAKE) ci-basic board=huzzah
  33. # espressif32
  34. $(MAKE) ci-basic board=lopy4
  35. # atmelsam
  36. $(MAKE) ci-basic board=adafruit_feather_m0
  37. $(MAKE) ci-basic board=adafruit_feather_m4
  38. # bluepill
  39. $(MAKE) ci-basic board=bluepill_f103c8
  40. ci-basic:
  41. $(platformio) ci --board=$(board) --lib="." examples/HX711_basic_example --verbose
  42. clean:
  43. $(platformio) run -t clean