help-make
[Top][All Lists]
Advanced

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

RE: VPATH


From: Mark Galeck (CW)
Subject: RE: VPATH
Date: Sat, 15 Jan 2011 12:17:15 -0800

>It simply does not look into VPATH and compiles only the .cpp files in the 
>directory where I launch "make".

That is because that is what you are asking make to do.  Your files_cpp, the 
result of your wildcard call, is the list of cpp files in the current 
directory, and that is what you are asking to compile.  

Also, the search for prerequisites, always by default begins with your current 
directory, and only after, if the file is not found, goes to VPATH.  


Mark  




CPP = g++ -g -Wall
VPATH = /home/CPractice/Repository

files_hpp = $(wildcard *.h)
files_cpp = $(wildcard *.cpp)

main: volcalc.exe

volcalc.exe: $(files_cpp) $(files_hpp)
        $(CPP) $(files_cpp) -o volcalc.exe
clean:
        @rm -f volcalc.exe                                        
_______________________________________________
Help-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-make



reply via email to

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