add ESP32 build system with xtensa-esp-elf toolchain
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user