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

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to