1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-09-28 23:57:37 +03:00

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)
This commit is contained in:
Werner Almesberger 2011-03-09 01:45:35 -03:00
parent 6ac82fc6c9
commit 1dcc83391e

View File

@ -14,7 +14,8 @@ SHELL = /bin/bash
NAME = atusb
CFLAGS = -g -Wall -Wextra -Wshadow -Werror -Wno-unused-parameter \
CFLAGS = -g -mmcu=$(CHIP) \
-Wall -Wextra -Wshadow -Werror -Wno-unused-parameter \
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
CHIP=atmega32u2
@ -62,10 +63,10 @@ all: $(NAME).bin boot.hex
$(NAME).elf: $(OBJS)
$(MAKE) version.o
$(CC) $(CFLAGS) -mmcu=$(CHIP) -o $@ $(OBJS) version.o
$(CC) $(CFLAGS) -o $@ $(OBJS) version.o
boot.elf: $(BOOT_OBJS)
$(CC) $(CFLAGS) -mmcu=$(CHIP) -o $@ $(BOOT_OBJS) \
$(CC) $(CFLAGS) -o $@ $(BOOT_OBJS) \
-Wl,--section-start=.text=0x7000
%.bin: %.elf
@ -104,7 +105,7 @@ version.c:
# ----- Dependencies ----------------------------------------------------------
%.o: %.c
$(CC) $(CFLAGS) -mmcu=$(CHIP) -Os -c $<
$(CC) $(CFLAGS) -Os -c $<
$(DEPEND) $< | \
sed -e \
'/^\(.*:\)\? */{p;s///;s/ *\\\?$$/ /;s/ */:\n/g;H;}' \