From bdd2cb7b9a1d9d1e34e1c838311a57a9ea552516 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 10 Oct 2021 21:48:10 +0200 Subject: Extract basic Teensy image builder --- Makefile.default | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Makefile.default (limited to 'Makefile.default') diff --git a/Makefile.default b/Makefile.default new file mode 100644 index 0000000..3bf5a70 --- /dev/null +++ b/Makefile.default @@ -0,0 +1,17 @@ +include $(TEENSY_PATH)/include/flags.mk + +CXXFLAGS += -std=gnu++20 + +LIBS = -lm -lstdc++ -lteensy-core + +CPP_FILES := $(wildcard *.cpp) +TARGETS := $(CPP_FILES:.cpp=.hex) + +%.elf: %.o + $(CC) $(LDFLAGS) -o $@ $< $(LIBS) + +%.hex: %.elf + $(SIZE) $< + $(OBJCOPY) -O ihex -R .eeprom $< $@ + +all: $(TARGETS) -- cgit v1.2.3