4 CFLAGS = -Iusbdrv -Ilibs-device -I.
5 AVRCC = avr-gcc -Wall -Os -DF_CPU=$(F_CPU) $(CFLAGS) -mmcu=$(DEVICE)
7 OBJECTS = usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o \
8 libs-device/osccalASM.o main.o
12 main.elf: $(OBJECTS) usbconfig.h
13 $(AVRCC) -o main.elf $(OBJECTS)
16 avr-objcopy -j .text -j .data -O ihex main.elf main.hex
20 rm -f $(OBJECTS) main.elf main.hex
22 # Build rules to use AVRCC rather than the host CC
28 $(AVRCC) -x assembler-with-cpp -c $< -o $@
30 # Hard coded dependencies for the usbdrv bits; otherwise changes to
31 # usbconfig.h don't result in enough bits getting recompiled.
33 libs-device/osccalASM.o: libs-device/osccalASM.S usbdrv/usbdrv.h usbconfig.h \
34 libs-device/osccal.h usbdrv/usbportability.h
36 usbdrv/oddebug.o: usbdrv/oddebug.c usbdrv/oddebug.h usbdrv/usbportability.h
38 usbdrv/usbdrv.o: usbdrv/usbdrv.c usbdrv/usbdrv.h usbconfig.h \
39 libs-device/osccal.h usbdrv/usbportability.h usbdrv/oddebug.h
41 usbdrv/usbdrvasm.o: usbdrv/usbdrvasm.S usbdrv/usbportability.h \
42 usbdrv/usbdrv.h usbconfig.h libs-device/osccal.h usbdrv/usbdrvasm165.inc \