# LinkDylib <link> : <source>
rule LinkDylib
{
    Clean clean "$(1)" ;
}
actions LinkDylib
{
    mkdir -p "$(1:D)"
    ln -s "$(2)" "$(1)"
}

# UsrLib <Target> : <LinkDir> <Framework>
rule UsrLib
{
    LIB_COM_ERR     = "$(2[1])/libcom_err.dylib" ;
    LIB_DES425      = "$(2[1])/libdes425.dylib" ;
    LIB_KRB4        = "$(2[1])/libkrb4.dylib" ;
    LIB_KRB5        = "$(2[1])/libkrb5.dylib" ;
    LIB_KRB524      = "$(2[1])/libkrb524.dylib" ;
    LIB_K5CRYPTO    = "$(2[1])/libk5crypto.dylib" ;
    LIB_GSSAPI_KRB5 = "$(2[1])/libgssapi_krb5.dylib" ;

    LinkDylib "$(LIB_COM_ERR)"     : "$(2[2])" ;  
    LinkDylib "$(LIB_DES425)"      : "$(2[2])" ;
    LinkDylib "$(LIB_KRB4)"        : "$(2[2])" ;    
    LinkDylib "$(LIB_KRB5)"        : "$(2[2])" ;
    LinkDylib "$(LIB_KRB524)"      : "$(2[2])" ;
    LinkDylib "$(LIB_K5CRYPTO)"    : "$(2[2])" ; 
    LinkDylib "$(LIB_GSSAPI_KRB5)" : "$(2[2])" ;
    
    DEPENDS "$(1)" : 	"$(LIB_COM_ERR)"
                        "$(LIB_DES425)"
                        "$(LIB_KRB4)" 
                        "$(LIB_KRB5)"
                        "$(LIB_KRB524)"
                        "$(LIB_K5CRYPTO)"
                        "$(LIB_GSSAPI_KRB5)" ;
}

UsrLib all     : "$(BUILT_PRODUCTS_DIR)" "/System/Library/Frameworks/Kerberos.framework/Kerberos" ;
UsrLib install : "$(DSTROOT)/usr/lib/"   "/System/Library/Frameworks/Kerberos.framework/Kerberos" ;

NOCARE installhdrs ;
NOTFILE installhdrs ;
