21 lines
359 B
Makefile
21 lines
359 B
Makefile
CC=avr-gcc
|
|
CFLAG= -g -mmcu=atmega168 -O
|
|
|
|
objects= time.o usart.o main.o ringbuffer.o configuration.o analogin.o
|
|
|
|
all:main.elf
|
|
|
|
%.o:%.c
|
|
$(CC) $(CFLAG) -c -o $@ $<
|
|
%.s:%.c
|
|
$(CC) $(CFLAG) -S -o $@ $<
|
|
|
|
|
|
main.elf: $(objects)
|
|
$(CC) $(objects) $(CFLAG) -o main.elf
|
|
install: main.elf
|
|
avrdude -p m168 -c avrispmkii -U flash:w:main.elf:a
|
|
|
|
clean:
|
|
-rm $(objects)
|