add ESP32 build system with xtensa-esp-elf toolchain

This commit is contained in:
2026-03-25 15:44:25 -06:00
parent 680a2fdb06
commit 29691ba182
5 changed files with 17 additions and 7 deletions

View File

@@ -22,11 +22,11 @@ EXCLUDE := $(SRCDIR)/spider/runtime/util/Terminal.cpp \
$(SRCDIR)/spider/runtime/debug/LiveDebug.cpp \
$(SRCDIR)/spider/SpiderRuntime.cpp
# ESP32 specific entry point
EXTRA := $(SRCDIR)/spider/main_esp32.cpp
# ESP32 specific entry point (local to this build folder)
EXTRA := ./main_esp32.cpp
SOURCES := $(filter-out $(EXCLUDE), $(shell find $(SRCDIR) -type f -name "*.$(SRCEXT)" 2>/dev/null)) $(EXTRA)
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.$(OBJEXT)))
OBJECTS := $(patsubst ./%,$(BUILDDIR)/%,$(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.$(OBJEXT))))
all: directories $(TARGET)
@echo "Build complete: $(TARGETDIR)/$(TARGET)"
@@ -53,4 +53,9 @@ $(BUILDDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SRCEXT)
@echo "Compiling $<..."
$(CC) $(CFLAGS) $(INC) -c -o $@ $<
$(BUILDDIR)/%.$(OBJEXT): ./%.$(SRCEXT)
@mkdir -p $(dir $@)
@echo "Compiling $<..."
$(CC) $(CFLAGS) $(INC) -c -o $@ $<
.PHONY: all remake clean cleaner