[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: VPATH
From: |
MD.Mahbubur Rahman |
Subject: |
RE: VPATH |
Date: |
Wed, 14 Sep 2011 01:53:15 -0700 (PDT) |
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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> 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.
- RE: VPATH,
MD.Mahbubur Rahman <=