updated the Makefile

This commit is contained in:
Daniel Knüttel 2019-01-17 19:40:07 +01:00
parent ded99b7059
commit 9232763962

View File

@ -1,15 +1,20 @@
CC=avr-gcc CC=avr-gcc
CFLAG= -mmcu=atmega8 -O CFLAG= -g -mmcu=atmega168 -O
objects= time.o usart.o main.o ringbuffer.o objects= time.o usart.o main.o ringbuffer.o configuration.o analogin.o
all:main.elf all:main.elf
%.o:%.c %.o:%.c
$(CC) $(CFLAG) -c -o $@ $< $(CC) $(CFLAG) -c -o $@ $<
%.s:%.c
$(CC) $(CFLAG) -S -o $@ $<
main.elf: $(objects) main.elf: $(objects)
$(CC) $(objects) $(CFLAG) -o main.elf $(CC) $(objects) $(CFLAG) -o main.elf
install: main.elf install: main.elf
avrdude -p m168 -c avrispmkii -U flash:w:main.elf:a avrdude -p m168 -c avrispmkii -U flash:w:main.elf:a
clean:
-rm $(objects)