This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: need help for editing a makefile


Hi Mahmoodn,

> I want to tell make that compile VVc_demo.cpp whenever "a.cpp" or "b.cpp" or
> "c.cpp" or ... changed.
> How can I do that?

VVc_demo$(OBJ_EXT) : a.cpp b.cpp c.cpp
  g++ -o $@ -c VVc_demo.cpp

(Usually you'd add VVc_demo.cpp itself to the dependency list as well.)

HTH,
--Eljay



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]