u-boot makefile make编译问题
makefile编译问题(不要看下面的内容很多,其实是比较简单的东西,麻烦大家耐心看一下,谢谢!)
就是makefile中的目标的依赖没有任何修改,为什么连续执行make命令会重新执行目标all下的命令,不是说只有当依赖的修改时间晚于目标时,make才会执行命令的吗?麻烦大家帮我看一下,谢谢!(下面附makefile文件,和连续2次执行make命令的结果)
makefile文件内容:
CFLAGS := -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding
all : crt0.S leds.c
arm-linux-gcc $(CFLAGS) -c -o crt0.o crt0.S
arm-linux-gcc $(CFLAGS) -c -o leds.o leds.c
arm-linux-ld -Tleds.lds crt0.o leds.o -o leds_elf
arm-linux-objcopy -O binary -S leds_elf leds.bin
arm-linux-objdump -D -m arm leds_elf > leds.dis
@echo echo output test
clean:
rm -f leds.dis leds.bin leds_elf *.o
第一次make结果:
book@book-desktop:~/s3c2440/bin/leds$ make
arm-linux-gcc -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding -c -o crt0.o crt0.S
arm-linux-gcc -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding -c -o leds.o leds.c
leds.c:29:2: warning: no newline at end of file
arm-linux-ld -Tleds.lds crt0.o leds.o -o leds_elf
arm-linux-objcopy -O binary -S leds_elf leds.bin
arm-linux-objdump -D -m arm leds_elf > leds.dis
echo output test
book@book-desktop:~/s3c2440/bin/leds$
第二次make(crt0.S leds.c文件没有任何修改):
book@book-desktop:~/s3c2440/bin/leds$ make
arm-linux-gcc -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding -c -o crt0.o crt0.S
arm-linux-gcc -Wall -Wstrict-prototypes -g -fomit-frame-pointer -ffreestanding -c -o leds.o leds.c
leds.c:29:2: warning: no newline at end of file
arm-linux-ld -Tleds.lds crt0.o leds.o -o leds_elf
arm-linux-objcopy -O binary -S leds_elf leds.bin
arm-linux-objdump -D -m arm leds_elf > leds.dis
echo output test
book@book-desktop:~/s3c2440/bin/leds$