Mail Archives: djgpp/1997/04/03/02:15:28
Hello,
I have a question about dependencies. In one of my programs, I distribute
Makefiles for DOS/DJGPP, Linux, Solaris, and IRIX. It uses some system
dependent files which may not always be in the same place, so I force the
person compiling my program to do a
gcc -MM *.c >>Makefile
so as to build the dependencies. This is not extremely "user friendly."
First, how do I include a "depend" target so that dependencies are made
when you type "make depend" ?
Second, are dependencies REALLY necessary, or can gcc figure them out on
its own? this is 'cause I (accidentally) tried to build my program on a
system where the Makefile didn't have any dependencies yet. Then I edited
one file and make'd it again, and all the .o files were NOT regenerated
(indicating that some kind of dependency checking was at work..) i.e. can
I dispense with dependencies altogether?
TIA, and cheers!
-----------------------------------------------------------------------
Orlando Andico IRC Lab/EE Dept/UP Diliman
email: orly AT gibson DOT eee DOT upd DOT edu DOT ph http://gibson.eee.upd.edu.ph
"There's an obvious attraction to the path of least resistance.."
- Raw text -