Thanks a lot for your replies Rennie and Matthias. This is really helpful.
Arvind On Dec 19, 2007 7:48 PM, Rennie deGraaf <[EMAIL PROTECTED]> wrote: > > On Dec 18, 2007 8:55 PM, Arvind Swaminathan <[EMAIL PROTECTED]> wrote: > > In the Makefile only the objects are listed. I don't see the rules > > for creating the objects. For instance, I would like to know the > > place where the compile command to create mac-802-11.o is located > > (since I want to add a -Ddegub flag to the cc command). > > There isn't an explicit rule to make mac-802_11.o. The makefile falls > back on the > implicit rule to build a .o file from a .cc file, which is > .cc.o: > @rm -f $@ > $(CPP) -c $(CFLAGS) $(INCLUDES) -o $@ $*.cc > If you want to set that macro for all files in ns, you should do is > to add "-Ddegub" > to "DEFINE" in Makefile.in, re-run configure, and then make, or better > yet, just run > CFLAGS="-Ddegub" make > That will set the "CFLAGS" variable in your system environment before running > make, which will incorporate its value into the CFLAGS string that it uses. > > If you only want to set that macro on the one file, add a rule to > Makefile.in similar > to the following: > mac/mac-802_11.o: mac/mac-802_11.cc > @rm -f $@ > $(CC) -c $(CFLAGS) -Ddegub $(INCLUDES) -o $@ $*.cc > Then, re-run configure and make. > > Rennie deGraaf >