micropython.mk 1.0 KB

123456789101112131415161718192021222324252627282930313233
  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 = https://github.com/micropython/micropython/commit/8b4fb4fe140e9cf57fcfa258d0d2d6fe19090fc5.patch
  12. # Use fallback implementation for exception handling on architectures that don't
  13. # have explicit support.
  14. ifeq ($(BR2_powerpc)$(BR2_sh)$(BR2_xtensa),y)
  15. MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
  16. endif
  17. define MICROPYTHON_BUILD_CMDS
  18. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/unix \
  19. CROSS_COMPILE=$(TARGET_CROSS) \
  20. CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS)
  21. endef
  22. define MICROPYTHON_INSTALL_TARGET_CMDS
  23. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/unix \
  24. DESTDIR=$(TARGET_DIR) \
  25. PREFIX=$(TARGET_DIR)/usr \
  26. install
  27. endef
  28. $(eval $(generic-package))