Files
nuki_hub/Makefile
iranl 6b0100fd61 Arduino Core 3 (#407)
* Add and remove libs and components for Arduino Core 3

* Arduino Core 3

* Add back Solo1

* Change ESP32-S3 to 4MB build

* Update README.md

* Fix retain and number of retries

* Fix rolling log

* Fix defaults

* Fix BleScanner on Solo1

* Export settings

* Import settings

* Fix HA Battery voltage

* Change submodule

* Update espMqttClient and AsyncTCP

* Webserial and MQTT/Network reconnecting

* Update nuki_ble

---------

Co-authored-by: iranl <iranl@github.com>
2024-07-05 23:45:39 +07:00

60 lines
1.5 KiB
Makefile

# Extract board names from platformio.ini
PLATFORMIO_INI := platformio.ini
BOARDS := $(shell grep -oP '(?<=\[env:)[^\]]+' $(PLATFORMIO_INI) | grep -v '_dbg')
DEBUG_BOARDS := $(shell grep -oP '(?<=\[env:)[^\]]+' $(PLATFORMIO_INI) | grep '_dbg')
# Default target
.PHONY: default
default: esp32
.PHONY: release
release: $(BOARDS)
.PHONY: updater
release: updater_$(BOARDS)
.PHONY: debug
debug: $(DEBUG_BOARDS)
# Target to build all boards in release, updater and debug modes
.PHONY: all
all: release updater debug
# Alias
.PHONY: esp32
esp32: esp32dev
esp%:
@echo "Building $@"
pio run --environment $@
updater_esp%:
@echo "Building $@"
pio run -d updater --environment $@
# Help target to display available build targets
.PHONY: help
help:
@echo "Makefile targets:"
@echo " make - Default build (ESP32 in release mode)"
@echo " make deps - Install software dependencies (PlatformIO)"
@echo " make all - Build all boards in both release and debug modes"
@$(foreach board,$(BOARDS),echo " make $(board) - Build $(board) in release mode";)
@$(foreach board,$(DEBUG_BOARDS),echo " make $(board) - Build $(board) in debug mode";)
@echo "Available boards:"
@echo " $(BOARDS)"
@echo " updater_$(BOARDS)"
@echo " $(DEBUG_BOARDS)"
# Utility target to clean build artifacts
.PHONY: clean
clean:
@echo "Cleaning build artifacts..."
@-rm -rf release debug .pio/build updater/.pio/build
# Install dependencies
.PHONY: deps
deps:
@echo "Installing dependencies..."
pip install --upgrade platformio esptool