Skript file: /~heha/Mikrocontroller/Displays/utft/Kalender.zip/ILI9325/Makefile

PROJECT = Kalender
DEVICE = atmega328p
F_CPU = 16000000
CL = avr-gcc -Wall -Wno-parentheses -Os -fno-move-loop-invariants -ffunction-sections -Wl,-gc-sections -mno-interrupts -mrelax -mmcu=$(DEVICE) -D F_CPU=$(F_CPU)
PGMR = avrdude -c arduino -p $(DEVICE) -P com4

FUSE = 0x59

all: $(PROJECT).hex $(PROJECT).lst

$(PROJECT).hex: $(PROJECT).elf
	avr-size -C --mcu=$(DEVICE) $<
	avr-objcopy -j .text -j .data -O ihex $< $@
	avr-objcopy -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $(PROJECT).eep

$(PROJECT).lst: $(PROJECT).elf
	avr-objdump -d $< > $@

Kalender.o: Kalender.cpp utft.h utft-config.h
	$(CL) -c -o $@ $<
utft.o: utft.cpp utft.h utft-config.h
	$(CL) -c -o $@ $<
#DefaultFonts.o: DefaultFonts.c
#	$(CL) -c -o $@ $<
ArialBP19.o: ArialBP19.c
	$(CL) -c -o $@ $<
ArialBP24.o: ArialBP24.c
	$(CL) -c -o $@ $<
TouchScreen.o: TouchScreen.cpp
	$(CL) -c -o $@ $<

$(PROJECT).elf: Kalender.o utft.o ArialBP19.o ArialBP24.o TouchScreen.o
	$(CL) -o $@ $^ -lc -lm

flash: $(PROJECT).hex
	$(PGMR) -U flash:w:$<
#-U eeprom:w:$(PROJECT).eep

# $@ = Ziel
# $< = Quelle (1. Datei)
# $^ = alle Quellen

#flash: $(PROJECT).hex
#	$(AVRDUDE) -U flash:w:$<:i
Detected encoding: ASCII (7 bit)2