diff --git a/c_mpos/mpong/Makefile b/c_mpos/mpong/Makefile index e69de29b..2538a7d3 100644 --- a/c_mpos/mpong/Makefile +++ b/c_mpos/mpong/Makefile @@ -0,0 +1,22 @@ +MPY_DIR = ../../lvgl_micropython/lib/micropython/ + +# Name of module +MOD = mpong + +# Source files (.c or .py) +SRC = mpong.c + +# Architectures to build for (x86, x64, armv6m, armv7m, xtensa, xtensawin, rv32imc, rv64imc) +ARCHES = x64 xtensawin + +ifeq ($(ARCH),) +.PHONY: all $(ARCHES) + +all: $(ARCHES) + +$(ARCHES): + $(MAKE) -f $(lastword $(MAKEFILE_LIST)) ARCH=$@ MOD=$(MOD)_$@ +else +# Include to get the rules for compiling and linking the module +include $(MPY_DIR)/py/dynruntime.mk +endif diff --git a/c_mpos/mpong/Makefile_amd64 b/c_mpos/mpong/Makefile_amd64 deleted file mode 100644 index 89e8fbc0..00000000 --- a/c_mpos/mpong/Makefile_amd64 +++ /dev/null @@ -1,13 +0,0 @@ -MPY_DIR = ../../lvgl_micropython/lib/micropython/ - -# Name of module -MOD = mpong - -# Source files (.c or .py) -SRC = mpong.c - -# Architecture to build for (x86, x64, armv6m, armv7m, xtensa, xtensawin, rv32imc, rv64imc) -ARCH = x64 - -# Include to get the rules for compiling and linking the module -include $(MPY_DIR)/py/dynruntime.mk diff --git a/c_mpos/mpong/Makefile_esp32 b/c_mpos/mpong/Makefile_esp32 deleted file mode 100644 index 557a76b3..00000000 --- a/c_mpos/mpong/Makefile_esp32 +++ /dev/null @@ -1,13 +0,0 @@ -MPY_DIR = ../../lvgl_micropython/lib/micropython/ - -# Name of module -MOD = mpong - -# Source files (.c or .py) -SRC = mpong.c - -# Architecture to build for (x86, x64, armv6m, armv7m, xtensa, xtensawin, rv32imc, rv64imc) -ARCH = xtensawin - -# Include to get the rules for compiling and linking the module -include $(MPY_DIR)/py/dynruntime.mk diff --git a/c_mpos/mpong/build.sh b/c_mpos/mpong/build.sh new file mode 100755 index 00000000..c811b113 --- /dev/null +++ b/c_mpos/mpong/build.sh @@ -0,0 +1,13 @@ +#. /home/user/projects/MicroPythonOS/claude/.espressif/python_env/idf5.4_py3.11_env/bin/activate + +mydir=$(readlink -f "$0") +mydir=$(dirname "$mydir") + +cd "$mydir" + +rm -rf build +rm *.mpy + +PATH=~/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/:$PATH make