set up unified lisp library and extensions subsystem.

This commit is contained in:
2025-04-11 01:17:32 -07:00
parent 2510da3f4a
commit f6c22d170a
9 changed files with 310 additions and 726 deletions

33
common/Makefile Normal file
View File

@@ -0,0 +1,33 @@
LISPS := $(wildcard *.lsp)
SOURCE := extensions.ino
OUTPUT := LispLibrary.h
TARGET := genlib
PLATFORMS := picocalc tdeck teensy
TARGETS_LIB := $(addprefix ../,$(addsuffix /$(OUTPUT),$(PLATFORMS)))
TARGETS_EXT := $(addprefix ../,$(addsuffix /$(SOURCE),$(PLATFORMS)))
CFLAGS += -Wall -Wextra -pedantic -Wshadow -Werror -std=c99 -g
.PHONY: all
all: $(TARGET)
.PHONY: all
install: $(TARGETS_LIB) $(TARGETS_EXT)
.PHONY: clean
clean:
rm $(OUTPUT) $(TARGET)
$(TARGET): $(LISPS) $(SOURCE) $(TARGET).c Makefile
$(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c
$(OUTPUT): $(TARGET) $(LISPS) $(SOURCE) Makefile
$(TARGETS_LIB): $(OUTPUT)
cp $(OUTPUT) $@
$(TARGETS_EXT): $(SOURCE)
cp $(SOURCE) $@
print-%: ; @echo '$(subst ','\'',$*=$($*))'