From 075c379d210b200ed89f40e385fe9cad5ed74863 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Fri, 11 Feb 2011 09:10:53 -0300 Subject: [PATCH] fw2/Makefile: cleaned up FreakUSB object file location The Makefile didn't see the FreakUSB object files at the expected place, so it always rebuild them. - Makefile (USB_OBJS): removed paths from object file names - Makefile: added vpaths for the FreakUSB source file locations - Makefile (atusb.elf, clean): we no longer need $(notdir ...) for the object files --- atusb/fw2/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/atusb/fw2/Makefile b/atusb/fw2/Makefile index c315854..9fb1f5b 100644 --- a/atusb/fw2/Makefile +++ b/atusb/fw2/Makefile @@ -1,4 +1,5 @@ NAME = atusb + CFLAGS = -g -Wall -Wextra -Wshadow -Werror -Wno-unused \ -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes @@ -10,16 +11,17 @@ OBJCOPY = $(AVR_PREFIX)objcopy #OBJDUMP = $(AVR_PREFIX)objdump FreakUSB = usb -USB_OBJS = $(FreakUSB)/usb/usb.o $(FreakUSB)/usb/ctrl.o \ - $(FreakUSB)/usb/usb_buf.o \ - $(FreakUSB)/hw/at90usbxx2/ep.o $(FreakUSB)/hw/at90usbxx2/hw.o \ - $(FreakUSB)/hw/at90usbxx2/isr.o +USB_OBJS = usb.o ctrl.o usb_buf.o ep.o hw.o isr.o OBJS = atusb.o board.o spi.o descr.o ep0.o $(USB_OBJS) +vpath %.c $(FreakUSB)/usb/ +vpath %.c $(FreakUSB)/hw/at90usbxx2/ + CFLAGS += -I../fw/include \ -I$(FreakUSB)/usb -I$(FreakUSB)/hw/at90usbxx2 \ -DNUM_EPS=1 + .PHONY: all clean upload prog all: $(NAME).bin @@ -28,13 +30,13 @@ all: $(NAME).bin $(CC) $(CFLAGS) -mmcu=$(CHIP) -Os -c $< $(NAME).elf: $(OBJS) - $(CC) $(CFLAGS) -mmcu=$(CHIP) -o $@ $(notdir $(OBJS)) + $(CC) $(CFLAGS) -mmcu=$(CHIP) -o $@ $(OBJS) %.bin: %.elf $(OBJCOPY) -j .text -j .data -O binary $< $@ clean: - rm -f $(NAME).bin $(NAME).elf $(notdir $(OBJS)) + rm -f $(NAME).bin $(NAME).elf $(OBJS) upload: $(NAME).bin scp $(NAME).bin jlime: