So for these two lines: files_hpp = $(wildcard *.h) files_cpp = $(wildcard *.cpp)
How I can make VPATH work for? Mark Galeck (CW) wrote: > >>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 > [email protected] > http://lists.gnu.org/mailman/listinfo/help-make > > _______________________________________________ > Help-make mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-make > > -- View this message in context: http://old.nabble.com/VPATH-tp30680920p32461828.html Sent from the Gnu - Make - Help mailing list archive at Nabble.com. _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
