[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Target search paths?

From: Randall Meadows
Subject: Target search paths?
Date: Tue, 18 Mar 2003 10:56:17 -0500

I hope I'm using the right term here...I need to figure out a way to tell make where to search for targets that I don't explicitly include a path with. Let me explain my problem...perhaps I'm doing something *completely* wrong here:

So I have this Makefile, in a given directory, A. In it, I define a variable SRC that includes all the source files, which happen to be strung out in several other directories, something like:


I'm trying to add header file dependency knowledge to this Makefile. I've used mkdep to generate a .depend file, and I'm including it in the Makefile. a typical line in it looks like:

QdBufferedIO.o: ../src/core/QdBufferedIO.c ../inc/QdPlatform.h

The problem is, the target "QdBufferedIO.o" does not include any path information. Since there is not ./QdBufferedIO.o relative to the location of the Makefile, it doesn't do anything. If I include the path information, like

../src/core/QdBufferedIO.o: ../src/core/QdBufferedIO.c ../inc/QdPlatform.h

make then does the right thing. There doesn't seem to be a way to get mkdep to include the path information for each target, so I figure there must be way to get make to look in various paths for each target. I see in the GNU Make Manual there is a VPATH variable, but I gather it only applies to prerequisites, not to targets. Is there anything analogous for targets?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]