2
1

micropython.mk 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ################################################################################
  2. #
  3. # micropython
  4. #
  5. ################################################################################
  6. MICROPYTHON_VERSION = v1.8.3
  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/8c6856d2e76c5865d9f30cad2c51615d4a1a1418.patch \
  12. https://github.com/micropython/micropython/commit/a50b26e4b00ed094aa1ac74eac2fc2d8eb9ea1ed.patch
  13. # Use fallback implementation for exception handling on architectures that don't
  14. # have explicit support.
  15. ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),)
  16. MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
  17. endif
  18. # When building from a tarball we don't have some of the dependencies that are in
  19. # the git repository as submodules
  20. MICROPYTHON_MAKE_OPTS = MICROPY_PY_BTREE=0
  21. MICROPYTHON_MAKE_OPTS += MICROPY_PY_USSL=0
  22. define MICROPYTHON_BUILD_CMDS
  23. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/unix \
  24. $(MICROPYTHON_MAKE_OPTS) \
  25. CROSS_COMPILE=$(TARGET_CROSS) \
  26. CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS)
  27. endef
  28. define MICROPYTHON_INSTALL_TARGET_CMDS
  29. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/unix \
  30. $(MICROPYTHON_MAKE_OPTS) \
  31. DESTDIR=$(TARGET_DIR) \
  32. PREFIX=$(TARGET_DIR)/usr \
  33. install
  34. endef
  35. $(eval $(generic-package))