2015-09-17 01:29:58 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# micropython
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-04-16 15:28:47 +02:00
|
|
|
MICROPYTHON_VERSION = v1.9.3
|
2015-09-17 01:29:58 +02:00
|
|
|
MICROPYTHON_SITE = $(call github,micropython,micropython,$(MICROPYTHON_VERSION))
|
|
|
|
MICROPYTHON_LICENSE = MIT
|
|
|
|
MICROPYTHON_LICENSE_FILES = LICENSE
|
|
|
|
MICROPYTHON_DEPENDENCIES = host-pkgconf libffi
|
|
|
|
|
|
|
|
# Use fallback implementation for exception handling on architectures that don't
|
|
|
|
# have explicit support.
|
2015-09-24 01:43:49 +02:00
|
|
|
ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),)
|
2015-09-17 01:29:58 +02:00
|
|
|
MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1
|
|
|
|
endif
|
|
|
|
|
2016-08-25 13:01:03 +02:00
|
|
|
# When building from a tarball we don't have some of the dependencies that are in
|
|
|
|
# the git repository as submodules
|
|
|
|
MICROPYTHON_MAKE_OPTS = MICROPY_PY_BTREE=0
|
|
|
|
MICROPYTHON_MAKE_OPTS += MICROPY_PY_USSL=0
|
|
|
|
|
2015-09-17 01:29:58 +02:00
|
|
|
define MICROPYTHON_BUILD_CMDS
|
2018-04-16 15:28:47 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/mpy-cross
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/ports/unix \
|
2016-08-25 13:01:03 +02:00
|
|
|
$(MICROPYTHON_MAKE_OPTS) \
|
2015-09-17 01:29:58 +02:00
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define MICROPYTHON_INSTALL_TARGET_CMDS
|
2018-04-16 15:28:47 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/ports/unix \
|
2016-08-25 13:01:03 +02:00
|
|
|
$(MICROPYTHON_MAKE_OPTS) \
|
2017-01-24 11:14:21 +01:00
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS) \
|
2015-09-17 01:29:58 +02:00
|
|
|
DESTDIR=$(TARGET_DIR) \
|
|
|
|
PREFIX=$(TARGET_DIR)/usr \
|
|
|
|
install
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|