Tuesday, 15 March 2011

makefile - vpath issue - not getting what i assumed -



makefile - vpath issue - not getting what i assumed -

i have vpath set follows:

vpath %.cpp $(src)

now if want list of object files created, should not work next ?

cobjs=$(patsubst %.cpp,%.o,$(wildcard *.cpp))

it not. not getting list of files when run command

make --just-print

it shows list of object files if next :

cobjs=$(patsubst %.cpp,%.o,$(wildcard $(src)/*.cpp))

any explanation?

the vpath directive tell create prerequisites of rules. have no effect on wildcard directive looks files-- thing.

makefile vpath

No comments:

Post a Comment