Open GoogleCodeExporter opened 9 years ago
Take a look at cpp.c:
/* We strip the -o option and allow cpp to write to stdout, which is
* caught in a file. Sun cc doesn't understand -E -o, and gcc screws up
* -MD -E -o.
*
* There is still a problem here with -MD -E -o, gcc writes dependencies
* to a file determined by the source filename. We could fix it by
* generating a -MF option, but that would break compilation with older
* versions of gcc. This is only a problem for people who have the source
* and objects in different directories, and who don't specify -MF. They
* can fix it by specifying -MF. */
Original comment by crazygeo...@gmail.com
on 27 Jul 2010 at 8:22
sinclude ../build/example.dep
../build/example.o:../src/example.c
$(CC) -c $< -o $@ -MF $(@:%.o=%.dep) -MP -MMD -I`dirname $<`
Original comment by crazygeo...@gmail.com
on 27 Jul 2010 at 8:54
I use -MMD -MF, but still object path in deps files is missing.
CFLAGS= -MF $(DEPS_DIR)/$<.d -MMD -msse2 -g3 -ggdb -Wall
Original comment by Nuclear...@gmail.com
on 23 Jan 2015 at 2:51
Original issue reported on code.google.com by
markit...@gmail.com
on 19 Feb 2010 at 4:05Attachments: