From aa0a04b76f2a4c278d9a42290bb48fe10632a8e5 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Fri, 26 Jan 2024 17:52:05 +0100 Subject: [PATCH] Include Makefile.env in Makefile for local configuration --- .gitignore | 1 + Makefile | 17 ++++++++++------- Makefile.env.example | 11 +++++++++++ 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 Makefile.env.example diff --git a/.gitignore b/.gitignore index 5d1649d..b33f1fb 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ __pycache__ *.mpy # Configuration files +/Makefile.env /src/webrepl_cfg.py /src/wlan_cfg.py diff --git a/Makefile b/Makefile index 50c24e9..eec6c63 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ -# Configuration -LIGHTBAR_HOST ?= 192.168.17.22 -LIGHTBAR_URL := http://$(LIGHTBAR_HOST) -WEBREPL_CLI := webrepl_cli.py -WEBREPL_HOST := $(LIGHTBAR_HOST) -WEBREPL_PASSWORD ?= acab -REPL_TTY_PATH ?= /dev/ttyUSB0 +# Configuration defaults (please use Makefile.env to override these, see Makefile.env.example) +LIGHTBAR_HOST = 192.168.13.12 +LIGHTBAR_URL = http://$(LIGHTBAR_HOST) +WEBREPL_CLI = webrepl_cli.py +WEBREPL_HOST = $(LIGHTBAR_HOST) +WEBREPL_PASSWORD = ultra-secret-webrepl-password +REPL_TTY_PATH = /dev/ttyUSB0 + +# Include local config +-include Makefile.env # Directory for saving timestamps of when files were last uploaded UPLOAD_CACHE_DIR := .upload_cache diff --git a/Makefile.env.example b/Makefile.env.example new file mode 100644 index 0000000..7486047 --- /dev/null +++ b/Makefile.env.example @@ -0,0 +1,11 @@ +# This is an example file. +# Copy this to Makefile.env and adjust it to the IP and password of your lightbar. + +# IP address or hostname of your lightbar +LIGHTBAR_HOST := 192.168.13.12 + +# Password for WebREPL as set in webrepl_cfg.py (used to transfer files to the ESP32) +WEBREPL_PASSWORD := ultra-secret-webrepl-password + +# Device path to the serial port of the ESP32 when connected via USB +REPL_TTY_PATH := /dev/ttyUSB0