I am reading the code of xv6, and find it hard to read the Makefile. Could you tell me how the following statements work:
1. "CFLAGS += $(shell $(CC) -fno-stack-protector -E -x c /dev/null >/dev/null 2>&1 && echo -fno-stack-protector)"
2. "LDFLAGS += -m $(shell $(LD) -V | grep elf_i386 2>/dev/null)"
3. "xv6.img:
bootblock kernel fs.img
dd if=/dev/zero of=xv6.img count=10000
dd if=bootblock of=xv6.img conv=notrunc
dd if=kernel of=xv6.img seek=1 conv=notrunc"
And how to learn Makefile in details? Could you recommand some good books?
Thank you!