[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mark Galeck (CW)
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.
CPP = g++ -g -Wall
VPATH = /home/CPractice/Repository
files_hpp = $(wildcard *.h)
files_cpp = $(wildcard *.cpp)
volcalc.exe: $(files_cpp) $(files_hpp)
$(CPP) $(files_cpp) -o volcalc.exe
@rm -f volcalc.exe
Help-make mailing list
- VPATH, Paolo Piacentini, 2011/01/15
- RE: VPATH,
Mark Galeck (CW) <=