summaryrefslogtreecommitdiff
path: root/Makefile.default
blob: 3bf5a702bbb65695e0588d3a8bf757410487a472 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)