# We make separate GOAL variables for each algorithm, to make it easy to
# switch each to the Legacy provider when needed.

$DSA_GOAL=../../libdefault.a ../../libfips.a
$EC_GOAL=../../libdefault.a ../../libfips.a
$MAC_GOAL=../../libdefault.a ../../libfips.a
$RSA_GOAL=../../libdefault.a ../../libfips.a
$SM2_GOAL=../../libdefault.a
$LMS_GOAL=../../libdefault.a ../../libfips.a
$ML_DSA_GOAL=../../libdefault.a ../../libfips.a
$SLH_DSA_GOAL=../../libdefault.a ../../libfips.a

IF[{- !$disabled{dsa} -}]
  SOURCE[$DSA_GOAL]=dsa_sig.c
ENDIF

IF[{- !$disabled{ec} -}]
  SOURCE[$EC_GOAL]=ecdsa_sig.c
  IF[{- !$disabled{ecx} -}]
    SOURCE[$EC_GOAL]=eddsa_sig.c
  ENDIF
ENDIF

IF[{- !$disabled{sm2} -}]
  SOURCE[$SM2_GOAL]=sm2_sig.c
ENDIF

SOURCE[$RSA_GOAL]=rsa_sig.c

DEPEND[ml_dsa_sig.o]=../../common/include/prov/der_ml_dsa.h
DEPEND[slh_dsa_sig.o]=../../common/include/prov/der_slh_dsa.h
DEPEND[rsa_sig.o]=../../common/include/prov/der_rsa.h
DEPEND[dsa_sig.o]=../../common/include/prov/der_dsa.h
DEPEND[ecdsa_sig.o]=../../common/include/prov/der_ec.h
DEPEND[eddsa_sig.o]=../../common/include/prov/der_ecx.h
DEPEND[sm2_sig.o]=../../common/include/prov/der_sm2.h

SOURCE[$MAC_GOAL]=mac_legacy_sig.c

IF[{- !$disabled{lms} -}]
  SOURCE[$LMS_GOAL]=lms_signature.c
ENDIF

IF[{- !$disabled{'ml-dsa'} -}]
  SOURCE[$ML_DSA_GOAL]=ml_dsa_sig.c
ENDIF

IF[{- !$disabled{'slh-dsa'} -}]
  SOURCE[$DSA_GOAL]=slh_dsa_sig.c
ENDIF
