help-make
[Top][All Lists]
Advanced

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

VPATH


From: Paolo Piacentini
Subject: VPATH
Date: Sat, 15 Jan 2011 11:58:22 -0800

It's the 1st time I'm using "make". Just to let you know my level of competence.

I've source files in different directories.

Therefore I should use VPATH in the makefile for compiling all together.



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



I don't see what's wrong with this makefile. Any hint, please?




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                                        

reply via email to

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