Tried out what I pulled from linux-2.5.make
1) warning present in Makefile
2) Annoying /././ when doing make dep
3) Did a ld built-in.o in scripts, despite obj-y is empty
- When i changed "=" to ":=" to fix next error ar failed.
ifdef O_TARGET replaced with ifdef obj-y to make it work
4) Could not link, no *.o file were used as parameters to ld
cmd_link_o_target := $(if $(strip $(obj-y)),\
$(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) -r -o $@ $(filter $(obj-y), $^),\
rm -f $@; $(AR) rcs $@)
$(O_TARGET): $(obj-y) FORCE
@echo XXXXX $^
@echo $(obj-y) - $@
Result:
make[1]: Entering directory `/home/sam/src/linux/kernel/bk/kai-make/init'
Generating /home/sam/src/linux/kernel/bk/kai-make/include/linux/compile.h (unchanged)
XXXXX main.o version.o do_mounts.o FORCE
./main.o ./version.o ./do_mounts.o - built-in.o
ld -m elf_i386 -r -o
ld: unrecognized option '-o'
ld: use the --help option for usage information
It seems that make strips "./" in front of all .o files listed in obj-y
Utilising $(filter-out FORCE,$(obj-y) did the trick for me.
[sam@mars kai-make]$ make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Hmmm, was the stuff present at bkbits incomplete?
Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/