webradio/firmware/Makefile

22 lines
571 B
Makefile
Raw Normal View History

2020-07-11 12:41:08 +02:00
MCU=atmega88
2020-07-19 18:40:44 +02:00
CFLAGS=-g -Wall -mcall-prologues -mmcu=$(MCU) -Os -DF_CPU=8000000 -IAVR-SSD1306/Files/
2020-07-11 12:41:08 +02:00
LDFLAGS=-Wl,-gc-sections -Wl,-relax
CC=avr-gcc
TARGET=main
2020-07-19 18:40:44 +02:00
_OBJECT_FILES=main.o AVR-SSD1306/Files/SSD1306.c AVR-SSD1306/Files/TWI.c
OBJECT_FILES=main.o oled-display/font.o oled-display/i2c.o oled-display/lcd.o
2020-07-11 12:41:08 +02:00
all: $(TARGET).hex
clean:
rm -f *.o *.hex *.obj *.hex
%.hex: %.obj
avr-objcopy -R .eeprom -O ihex $< $@
%.obj: $(OBJECT_FILES)
$(CC) $(CFLAGS) $(OBJECT_FILES) $(LDFLAGS) -o $@
program: $(TARGET).hex
avrdude -p $(MCU) -c usbasp -U flash:w:$(TARGET).hex