Improve make file

Adapt to new programmer and use variables for the clean target.
This commit is contained in:
finga 2021-09-08 13:59:38 +02:00
parent 86ec90b202
commit cec207984a

View file

@ -1,7 +1,7 @@
.SUFFIXES: .SUFFIXES:
MCU := atmega328p MCU := atmega328p
PROGRAMMER := usbtiny PROGRAMMER := usbasp
TARGET := main.hex TARGET := main.hex
BIN := main.elf BIN := main.elf
@ -32,7 +32,7 @@ flash: $(TARGET) size
$(AVRDUDE) -p $(MCU) -c $(PROGRAMMER) -U flash:w:$<:a $(AVRDUDE) -p $(MCU) -c $(PROGRAMMER) -U flash:w:$<:a
clean: clean:
$(RM) main.o main.elf main.hex $(RM) $(TARGET) $(BIN) $(OBJ)
check: check:
cppcheck main.c cppcheck main.c