diff options
Diffstat (limited to 'Makefile.default')
-rw-r--r-- | Makefile.default | 17 |
1 files changed, 17 insertions, 0 deletions
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) |