2 # Copyright (C) 2008-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=https
://github.com
/micropython
/micropython
/releases
/download
/v
$(PKG_VERSION
)
16 PKG_HASH
:=96fc71b42ed331c64e1adc5a830ec4f29f2975c23e8751109c03f32b80fa3eb4
18 PKG_MAINTAINER
:=Jeffery To
<jeffery.to@gmail.com
>
20 PKG_LICENSE_FILES
:=LICENSE
24 include $(INCLUDE_DIR
)/host-build.mk
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/micropython
/default
32 URL
:=https
://micropython.org
37 define Package
/micropython-mbedtls
38 $(call Package
/micropython
/default
)
45 define Package
/micropython-nossl
46 $(call Package
/micropython
/default
)
51 define Package
/micropython
/default
/description
52 MicroPython is a lean and efficient implementation of the Python
3
53 programming language that includes a small subset of the Python
54 standard library and is optimised to run on microcontrollers and in
55 constrained environments.
58 define Package
/micropython-mbedtls
/description
59 $(call Package
/micropython
/default
/description
)
61 This version uses the Mbed TLS library.
64 define Package
/micropython-nossl
/description
65 $(call Package
/micropython
/default
/description
)
67 This version is built without TLS and upip.
70 MAKE_FLAGS
+= BUILD_VERBOSE
=1
72 ifneq ($(CONFIG_DEBUG
),)
76 ifeq ($(BUILD_VARIANT
),mbedtls
)
77 MAKE_FLAGS
+= MICROPY_SSL_AXTLS
=0 MICROPY_SSL_MBEDTLS
=1
80 ifeq ($(BUILD_VARIANT
),nossl
)
81 MAKE_FLAGS
+= MICROPY_PY_USSL
=0 FROZEN_MANIFEST
=
84 MAKE_PATH
= ports
/unix
88 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/mpy-cross \
89 $(HOST_MAKE_FLAGS
) BUILD_VERBOSE
=1
90 $(call Build
/Compile
/Default
)
93 define Package
/micropython
/default
/install
94 $(INSTALL_DIR
) $(1)/usr
/bin
95 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/ports
/unix
/micropython
$(1)/usr
/bin
/
98 Package
/micropython-mbedtls
/install = $(Package
/micropython
/default
/install)
99 Package
/micropython-nossl
/install = $(Package
/micropython
/default
/install)
101 $(eval
$(call BuildPackage
,micropython-mbedtls
))
102 $(eval
$(call BuildPackage
,micropython-nossl
))