micropython.mk 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. ################################################################################
  2. #
  3. # micropython
  4. #
  5. ################################################################################
  6. MICROPYTHON_VERSION = v1.4.5
  7. MICROPYTHON_SITE = $(call github,micropython,micropython,$(MICROPYTHON_VERSION))
  8. MICROPYTHON_LICENSE = MIT
  9. MICROPYTHON_LICENSE_FILES = LICENSE
  10. MICROPYTHON_DEPENDENCIES = host-pkgconf libffi
  11. MICROPYTHON_PATCH = \
  12. https://github.com/micropython/micropython/commit/8b4fb4fe140e9cf57fcfa258d0d2d6fe19090fc5.patch \
  13. https://github.com/micropython/micropython/commit/587914169cc6ff7f0513bd14c42dcbb275bf77bd.patch
  14. # Use fallback implementation for exception handling on architectures that don't
  15. # have explicit support.
  16. ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),)
  17. MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
  18. endif
  19. define MICROPYTHON_BUILD_CMDS
  20. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/unix \
  21. CROSS_COMPILE=$(TARGET_CROSS) \
  22. CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS)
  23. endef
  24. define MICROPYTHON_INSTALL_TARGET_CMDS
  25. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/unix \
  26. DESTDIR=$(TARGET_DIR) \
  27. PREFIX=$(TARGET_DIR)/usr \
  28. install
  29. endef
  30. $(eval $(generic-package))