set up unified lisp library and extensions subsystem.
This commit is contained in:
33
common/Makefile
Normal file
33
common/Makefile
Normal 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 ','\'',$*=$($*))'
|
||||
Reference in New Issue
Block a user