Skript /~heha/ewa/Ofen/prozess.zip/avr/o1/Makefile

# Makefile für ATmega32U4-Firmware auf Arduino-Nachbauboard „Pro Micro“
# für Eigenbau-Automatisierung: Ofensteuerung (Temperaturkurve fahren)
# Zuständig: Fabian Lorenz, 32482
# Henrik Haftmann, 190715
P = o1
D = atmega32u4
F = 16000000

PATH := c:\programs\winavr\gcc492\bin;$(PATH)

# Compiler und Linker:
C = avr-gcc -Wall -Wno-parentheses -Wno-array-bounds -Os -mmcu=$D -std=c++11 -D F_CPU=$F
# -D DEBUG
#no-parentheses: Ich weiß selbst wo Klammern nötig sind
#no-array-bounds: Flash-Stringadressen nicht im Flash (0..7FFF)
#no-char-subscripts: Bytes als Array-Indizes sind okay für kleine Arrays

all: $P.lst

# Alle C++-Dateien sind (der Einfachheit halber) von allen Kopfdateien abhängig
$P.elf: *.cpp *.h Makefile
	$C -o $@ $(filter %.cpp,$^)
# Das alte avr-size aufheben! Das neue kann kein -C
	avr-size -C --mcu=$D $@

$P.hex: $P.elf
	avr-objcopy -j .text -j .data -O ihex $< $@

$P.lst: $P.elf
	avr-objdump -d $< > $@
	avr-strip $<

# 512-Byte-Urlader ubaboot
flash: $P.elf
	uba $<
Vorgefundene Kodierung: UTF-80