diff options
author | Adrian Kummerlaender | 2021-10-10 21:48:10 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2021-10-10 21:48:10 +0200 |
commit | bdd2cb7b9a1d9d1e34e1c838311a57a9ea552516 (patch) | |
tree | dd1bafa866328ad6853f955200d78f8a6080a54b /Makefile.default | |
parent | 59918fa4f925c063c8beec7142f786eda5746cc4 (diff) | |
download | teensy-env-bdd2cb7b9a1d9d1e34e1c838311a57a9ea552516.tar teensy-env-bdd2cb7b9a1d9d1e34e1c838311a57a9ea552516.tar.gz teensy-env-bdd2cb7b9a1d9d1e34e1c838311a57a9ea552516.tar.bz2 teensy-env-bdd2cb7b9a1d9d1e34e1c838311a57a9ea552516.tar.lz teensy-env-bdd2cb7b9a1d9d1e34e1c838311a57a9ea552516.tar.xz teensy-env-bdd2cb7b9a1d9d1e34e1c838311a57a9ea552516.tar.zst teensy-env-bdd2cb7b9a1d9d1e34e1c838311a57a9ea552516.zip |
Extract basic Teensy image builder
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) |