Hi Mr. Fowler,

Thank you for the explanation.
The nmake documentation
http://www.research.att.com/~gsf/nmake/nmake.html state that :NMAKE:
operator determines the build order for all subdirectories for recursive
nmake build.
How nmake determines subdirectory build order include library
dependency.

Thanks
Sang

-----Original Message-----
From: Glenn Fowler [mailto:[email protected]] 
Sent: Tuesday, May 05, 2009 4:28 PM
To: [email protected]; Lee, Sang
Subject: Re: [ast-users] How nmake figure out implicit library
dependency?


On Tue, 5 May 2009 16:12:51 -0400 Lee, Sang wrote:
> I understand that nmake bind all explicit and implicit dependent
header
> files via the scan rule.
> Could someone please explain to me how nmake determine implicit
> dependent libraries?
> Does nmake links libraries to the target binary if their header files
> have implicit dependent on the target? 

nmake is in between implicit and explicit

library assertions allow library prerequisites

        foo :LIBRARY: foo.c -lbar -lbam

the -l* prereqs of :LIBRARY: that exist are added as implicit prereqs of
the target library

e.g., suppose -lbar exists but -lbam does not
then every makefile prereq
        -lfoo
will expand to
        -lfoo -lbar
(and the build of foo will not complain about -lbam not existing)

so
        cmd :: cmd.c -lfoo
will link these libraries
        -lfoo -lbar

but the makefile must explicitly assert the -lfoo prerequisite

the implicit prerequisites for -lfoo are in the generated file
        $INSTALLROOT/lib/lib/foo

hope that helps


THE INFORMATION CONTAINED IN THIS MESSAGE AND ANY ATTACHMENT MAY BE PRIVILEGED, 
CONFIDENTIAL, PROPRIETARY OR OTHERWISE PROTECTED FROM DISCLOSURE. If the reader 
of this message is not the intended recipient, you are hereby notified that any 
dissemination, distribution, copying or use of this message and any attachment 
is strictly prohibited. If you have received this message in error, please 
notify us immediately by replying to the message and permanently delete it from 
your computer and destroy any printout thereof.
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to