I am trying to get my make basics right.

I have 2 questions about working of make

1) Implicit rules

I write a rule like this

a : a.o

When I execute make, the foll. 2 command execute

cc -c -o b.o b.c
cc b.o -o b

Thing which is perplexing is that I have not written a fule which has a.o as target, yet make compiles a.c and creates a.o (its a different story that this is what I really wanted make to do)

Which implicit rule is making this happen ?

2) makedepend

I am trying to use makedepend to create dependancy rules automatically.
My make to do that is as follows

b : b.o

.PHONY : depend
depend :
     @makedepend -f -b.c > dependancies.d

-include dependancies.d

Is there a file called dependancies.d created when as a result of executuion of this make file ?
I did not find this file in my dir ? Am I doing some mistake ?

Thanks ..

_________________________________________________________________
Tickle your funny bone with Rahul Phondke http://content.msn.co.in/Lifestyle/Moreonlifestyle/LifestyleFB_101106_1455.htm



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to