PDA

View Full Version : makefile question



daviddoria
24th November 2009, 11:32 PM
I am trying to make a project and I am getting many many errors like:



gmake[2]: *** No rule to make target `/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h', needed by `smooth.o'. Stop.


Here is a part of one of the Makefile that I don't understand:


....
depend:
makedepend -o$(OBJ) -- $(INCFLAGS) $(MAKEDEPEND_INCFLAGS) $(DEFINEFLAGS) -- $(ALL_FILES)
dependDebug:
makedepend -o$(DOBJ) -- $(DEBUG_INCFLAGS) $(MAKEDEPEND_INCFLAGS) $(DEBUG_DEFINEFLAGS) -- $(ALL_FILES)

# DO NOT DELETE THIS LINE -- make depend depends on it.

ExtractVector.o: ../../include/formDefs.h ../../include/MTplatforms.h
ExtractVector.o: /usr/include/stdio.h /usr/include/features.h
ExtractVector.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h
ExtractVector.o: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h
ExtractVector.o: /usr/include/bits/types.h /usr/include/bits/wordsize.h
ExtractVector.o: /usr/include/bits/typesizes.h /usr/include/libio.h
ExtractVector.o: /usr/include/_G_config.h /usr/include/wchar.h


What are all of these headers that the object apparently depends on? I thought that only implementation files needed to be stated in Makefiles? I realize the details are pretty spotty here - but can anyone give me a "high level" explanation of what is going on here?

Thanks,

Dave

markkuk
24th November 2009, 11:51 PM
The dependecies below the "DO NOT DELETE" line have been automatically generated by the makedepend command in the depend: rule of the makefile. Try running "make depend" to update the dependencies to match your file locations.

daviddoria
25th November 2009, 12:16 AM
When I run 'make depend', I get a lot of these errors:


cannot find include file "iostream"
cannot find include file "stddef.h"
cannot find include file "stdarg.h"


I searched for stddef.h as an example and found it in many places:


/usr/lib/gcc/i586-redhat-linux/3.4.6/include/stddef.h
/usr/lib/gcc/i586-redhat-linux/4.4.1/include/stddef.h
/usr/include/linux/stddef.h


make seems to be only looking in a couple of directories:


makedepend: warning: dVector.c (reading /usr/include/stdio.h, line 34): cannot find include file "stddef.h"
not in ../../include/stddef.h
not in ../../3rd_party/libarg/stddef.h
not in /usr/X11R6/include/stddef.h
not in /usr/local/include/stddef.h
not in /usr/include/g++-2/stddef.h
not in /usr/include/stddef.h


Is there a way to have make search harder? Or specify more directories to look in?

Thanks,

Dave