I'm building Syslinux and there is one specific directory that I would like a different CC for. Instead of patching the Makefile, I can't I just invoke make with special arguments for that file? I haven't figured out how to do this.
When I just run make normally, this last lines are:
make -r -C lzo SRC="/syslinux-6.03/lzo" OBJ="/syslinux-6.03/bios/lzo" \ -f /syslinux-6.03/lzo/Makefile all make[3]: Entering directory '/syslinux-6.03/bios/lzo' gcc -o prepcore prepcore.o lzo.a But if I cd into bios/lzo and run make prepcore, it doesn't work, probably because it needs some environment from the parent directory Makefiles. The error message is:
make: Entering directory '/syslinux-6.03/lzo' /syslinux-6.03/lzo/Makefile:14: /build.mk: No such file or directory make: *** No rule to make target '/build.mk'. Stop. make: Leaving directory '/syslinux-6.03/lzo' So my question is, what is the correct way of telling make "for the current directory tree, find a target for <file> and make it"?
make prepcore; hereprepcoreis the name of a target you've asked make to build. So I don't understand your question.lzo.a, which results in unresolved symbols.makegiving that target name.SRC,OBJandMAKEDIR. trymake -r -C lzo SRC="/path/to/syslinux-6.03/lzo" OBJ="/path/to/syslinux-6.03/bios/lzo" MAKEDIR="/path/to/syslinux-6.03/mk" -f /path/to/syslinux-6.03/lzo/Makefile prepcore(cwd should be/path/to/syslinux-6.03)