need help for editing a makefile

John Love-Jensen eljay@adobe.com
Tue Dec 11 12:21:00 GMT 2007


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




More information about the Gcc-help mailing list