Skript file: /~heha/basteln/PC/usbfloppy/usbfloppy.zip/makefile

# USB-Diskettenlaufwerkscontroller für bis zu 5 Laufwerke
# als MSC-Geräteklasse mit Datenkodierung in Software

PROJECT = usbfloppy
DEVICE  = atmega32u4
F_CPU   = 16000000
COMPILE = avr-gcc.exe -Wall -Wno-parentheses -Os -DF_CPU=$(F_CPU) -mmcu=$(DEVICE) -DARDUINO -DDEBUG

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

$(PROJECT).elf: main.cpp usb.cpp ufi.cpp rw.S
	$(COMPILE) -o $@ $^

%.hex: $(PROJECT).elf
	avr-objcopy -j .text -j .data -O ihex $< $@
	@avr-size -C --mcu=$(DEVICE) $<

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

flash: $(PROJECT).hex
	avrdude -p $(DEVICE) -P com8 -c avr109 -e -U flash:w:$<
Detected encoding: UTF-80