Date:2011-02-11 13:10:53 (13 years 1 month ago)
Author:Werner Almesberger
Commit:075c379d210b200ed89f40e385fe9cad5ed74863
Message: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
Files: atusb/fw2/Makefile (3 diffs)

Change Details

atusb/fw2/Makefile
11NAME = atusb
2
23CFLAGS = -g -Wall -Wextra -Wshadow -Werror -Wno-unused \
34     -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
45
...... 
1011#OBJDUMP = $(AVR_PREFIX)objdump
1112
1213FreakUSB = usb
13USB_OBJS = $(FreakUSB)/usb/usb.o $(FreakUSB)/usb/ctrl.o \
14  $(FreakUSB)/usb/usb_buf.o \
15  $(FreakUSB)/hw/at90usbxx2/ep.o $(FreakUSB)/hw/at90usbxx2/hw.o \
16  $(FreakUSB)/hw/at90usbxx2/isr.o
14USB_OBJS = usb.o ctrl.o usb_buf.o ep.o hw.o isr.o
1715OBJS = atusb.o board.o spi.o descr.o ep0.o $(USB_OBJS)
1816
17vpath %.c $(FreakUSB)/usb/
18vpath %.c $(FreakUSB)/hw/at90usbxx2/
19
1920CFLAGS += -I../fw/include \
2021      -I$(FreakUSB)/usb -I$(FreakUSB)/hw/at90usbxx2 \
2122      -DNUM_EPS=1
2223
24
2325.PHONY: all clean upload prog
2426
2527all: $(NAME).bin
...... 
2830        $(CC) $(CFLAGS) -mmcu=$(CHIP) -Os -c $<
2931
3032$(NAME).elf: $(OBJS)
31        $(CC) $(CFLAGS) -mmcu=$(CHIP) -o $@ $(notdir $(OBJS))
33        $(CC) $(CFLAGS) -mmcu=$(CHIP) -o $@ $(OBJS)
3234
3335%.bin: %.elf
3436        $(OBJCOPY) -j .text -j .data -O binary $< $@
3537
3638clean:
37        rm -f $(NAME).bin $(NAME).elf $(notdir $(OBJS))
39        rm -f $(NAME).bin $(NAME).elf $(OBJS)
3840
3941upload: $(NAME).bin
4042        scp $(NAME).bin jlime:

Archive Download the corresponding diff file



interactive