You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
372 B
Makefile
20 lines
372 B
Makefile
# Define variables
|
|
MPY_CROSS = ../micropython/mpy-cross/build/mpy-cross
|
|
|
|
SRC_DIR = .
|
|
OUT_DIR = .
|
|
SRC = $(wildcard $(SRC_DIR)/*.py)
|
|
OUT = $(patsubst $(SRC_DIR)/%.py, $(OUT_DIR)/%.mpy, $(SRC))
|
|
|
|
# Default target
|
|
# all: $(OUT) $(OUT_DIR)/sh.txt
|
|
all: $(OUT)
|
|
|
|
# Rule to create .mpy from .py
|
|
$(OUT_DIR)/%.mpy: $(SRC_DIR)/%.py
|
|
$(MPY_CROSS) $< -o $@
|
|
|
|
# Phony targets
|
|
.PHONY: all
|
|
|