Date:2011-03-09 05:45:35 (13 years 10 days ago)
Author:Werner Almesberger
Commit:1dcc83391e51890c76fc8e11aeb24300a99412a2
Message:atusb/fw/Makefile: put -mmcu into CFLAGS so that DEPEND uses it, too

- Makefile ($(NAME).elf, boot.elf, %.o): don't pass -mmcu explicitly
- Makefile (CFLAGS): include -mmcu, so that it's also picked up by
$(DEPEND)
Files: atusb/fw/Makefile (3 diffs)

Change Details

atusb/fw/Makefile
1414
1515NAME = atusb
1616
17CFLAGS = -g -Wall -Wextra -Wshadow -Werror -Wno-unused-parameter \
17CFLAGS = -g -mmcu=$(CHIP) \
18     -Wall -Wextra -Wshadow -Werror -Wno-unused-parameter \
1819     -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
1920
2021CHIP=atmega32u2
...... 
6263
6364$(NAME).elf: $(OBJS)
6465        $(MAKE) version.o
65        $(CC) $(CFLAGS) -mmcu=$(CHIP) -o $@ $(OBJS) version.o
66        $(CC) $(CFLAGS) -o $@ $(OBJS) version.o
6667
6768boot.elf: $(BOOT_OBJS)
68        $(CC) $(CFLAGS) -mmcu=$(CHIP) -o $@ $(BOOT_OBJS) \
69        $(CC) $(CFLAGS) -o $@ $(BOOT_OBJS) \
6970          -Wl,--section-start=.text=0x7000
7071
7172%.bin: %.elf
...... 
104105# ----- Dependencies ----------------------------------------------------------
105106
106107%.o: %.c
107        $(CC) $(CFLAGS) -mmcu=$(CHIP) -Os -c $<
108        $(CC) $(CFLAGS) -Os -c $<
108109        $(DEPEND) $< | \
109110          sed -e \
110111            '/^\(.*:\)\? */{p;s///;s/ *\\\?$$/ /;s/ */:\n/g;H;}' \

Archive Download the corresponding diff file



interactive