Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
b75e6778
Commit
b75e6778
authored
Oct 03, 2025
by
Eric Duminil
Browse files
Define make targets
parent
6e2b57ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
b75e6778
# TODO: Add default targets
# TODO: Add default targets
################################################################################
# CO2 Ampel Firmware - Makefile #
################################################################################
all
:
## Run `make` to show available targets
help
:
##
Show this help.
@
egrep
-h
'(\s##\s|^##\s)'
$(MAKEFILE_LIST)
| egrep
-v
'^--'
|
awk
'BEGIN {FS = ":.*?## "}; {printf "\033[32m %-35s\033[0m %s\n", $$1, $$2}'
build
:
##
Build. (board should be defined)
ifdef
board
ifdef
board
pio
-f
-c
vim run
-e
$(board)
pio
-f
-c
vim run
-e
$(board)
else
else
pio
-f
-c
vim run
@
echo
"Please define board parameter:"
@
echo
"make build board=esp8266"
@
echo
"or"
@
echo
"make build board=esp32"
@
exit
1
endif
endif
upload
:
build_all
:
##
Build for all boards
pio
-f
-c
vim run
upload
:
##
Upload to ESP. (board should be defined)
ifdef
board
pio
-f
-c
vim run
--target
upload
-e
$(board)
pio
-f
-c
vim run
--target
upload
-e
$(board)
else
@
echo
"Please define board parameter:"
@
echo
"make upload board=esp8266"
@
exit
1
endif
clean
:
clean
:
##
Clean code
pio
-f
-c
vim run
--target
clean
pio
-f
-c
vim run
--target
clean
program
:
program
:
...
@@ -22,5 +43,5 @@ uploadfs:
...
@@ -22,5 +43,5 @@ uploadfs:
update
:
update
:
pio
-f
-c
vim update
pio
-f
-c
vim update
monitor
:
monitor
:
##
Monitor ESP output
pio device monitor
--filter
colorize
pio device monitor
--filter
colorize
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment