-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathMakefile
70 lines (50 loc) · 1.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Copyright (c) 2024 - 2025 Kevin G. Schlosser
# Makefile for LVGL_Micropython Binding
PYTHON_CMD=python3
# User-friendly check for python3
ifeq ($(shell which $(PYTHON_CMD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(PYTHON)' command was not found. Make sure you have Python 3.8.x+)
endif
variables=$(foreach v,$(.VARIABLES),$(if $(filter command line,$(origin $(v))),$(v)=$($(v))))
BUILD_CMD=$(shell echo "${variables}" | sed 's/[ ][ ]*/ /g')
arguments = $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
target =$@
PYTHON_CMD += make.py
ifneq (,$(findstring clean ,$(arguments)))
args=$(subst clean ,,$(arguments))
clean_cmd =clean
else
args=$(arguments)
clean_cmd =
endif
BUILD_CMD+=$(foreach v,$(args),--$(v))
.ONESHELL:
esp32:
@$(PYTHON_CMD) $@ $(clean_cmd) $(BUILD_CMD)
@exit 0
stm32:
@$(PYTHON_CMD) $@ $(clean_cmd) $(BUILD_CMD)
@exit 0
unix:
@$(PYTHON_CMD) $@ $(clean_cmd) $(BUILD_CMD)
@exit 0
rp2:
@$(PYTHON_CMD) $@ $(clean_cmd) $(BUILD_CMD)
@exit 0
macOS:
@$(PYTHON_CMD) $@ $(clean_cmd) $(BUILD_CMD)
@exit 0
renesas-ra:
@$(PYTHON_CMD) $@ $(clean_cmd) $(BUILD_CMD)
@exit 0
nrf:
@$(PYTHON_CMD) $@ $(clean_cmd) $(BUILD_CMD)
@exit 0
mimxrt:
@$(PYTHON_CMD) $@ $(clean_cmd) $(BUILD_CMD)
@exit 0
samd:
@$(PYTHON_CMD) $@ $(clean_cmd) $(BUILD_CMD)
@exit 0
%:
@exit 0