avrinput/Makefile

21 lines
371 B
Makefile
Raw Permalink Normal View History

2019-01-01 15:48:54 +00:00
CC=avr-gcc
2019-01-17 18:40:07 +00:00
CFLAG= -g -mmcu=atmega168 -O
2019-01-01 15:48:54 +00:00
objects= time.o usart.o main.o ringbuffer.o configuration.o analogin.o analogout.o
2019-01-01 15:48:54 +00:00
all:main.elf
%.o:%.c
$(CC) $(CFLAG) -c -o $@ $<
2019-01-17 18:40:07 +00:00
%.s:%.c
$(CC) $(CFLAG) -S -o $@ $<
2019-01-01 15:48:54 +00:00
main.elf: $(objects)
$(CC) $(objects) $(CFLAG) -o main.elf
install: main.elf
avrdude -p m168 -c avrispmkii -U flash:w:main.elf:a
2019-01-17 18:40:07 +00:00
clean:
-rm $(objects)