freebsd-src/kerberos5/Makefile.inc
Lexi Winter dc5ba6b8b4 Remove MK_GSSAPI
For MIT Kerberos, MK_GSSAPI has no meaning: GSSAPI is a required part of
Kerberos and is always built if MK_KERBEROS is enabled.  Backport this
behaviour to Heimdal so it works the same way.

While here, change Heimdal's libcom_err and compile_et to be selected by
MK_KERBEROS, not MK_KERBEROS_SUPPORT, since these are part of Kerberos
and third-party users might need it even if Kerberos support is disabled
in the base system.  This means MK_KERBEROS_SUPPORT installs the same
files with both MIT and Heimdal.

Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D51859
2025-08-20 19:42:20 +01:00

50 lines
1.2 KiB
Makefile

.include <src.opts.mk>
KRB5DIR= ${SRCTOP}/crypto/heimdal
CFLAGS+= -DHAVE_CONFIG_H -I${.CURDIR:H:H}/include
WARNS?= 1
CWARNFLAGS.clang+= -Wno-absolute-value
.if ${MK_OPENLDAP} != "no" && !defined(COMPAT_LIBCOMPAT)
OPENLDAPBASE?= /usr/local
LDAPLDADD= -lldap -llber
LDAPDPADD= ${LDAPLDADD:C;^-l(.*)$;${OPENLDAPBASE}/lib/lib\1.a;}
LDAPCFLAGS= -I${OPENLDAPBASE}/include -DOPENLDAP=1 -DLDAP_DEPRECATED=1
LDAPLDFLAGS= -L${OPENLDAPBASE}/lib -rpath ${OPENLDAPBASE}/lib
.endif
.if defined(SRCS)
ETSRCS= \
${KRB5DIR}/lib/asn1/asn1_err.et \
${KRB5DIR}/lib/hdb/hdb_err.et \
${KRB5DIR}/lib/kadm5/kadm5_err.et \
${KRB5DIR}/lib/krb5/heim_err.et \
${KRB5DIR}/lib/krb5/k524_err.et \
${KRB5DIR}/lib/krb5/krb5_err.et \
${KRB5DIR}/lib/krb5/krb_err.et \
${KRB5DIR}/lib/hx509/hx509_err.et \
${KRB5DIR}/lib/wind/wind_err.et \
${KRB5DIR}/lib/ntlm/ntlm_err.et
ETSRCS+= ${KRB5DIR}/lib/gssapi/krb5/gkrb5_err.et
.for ET in ${ETSRCS}
.for _ET in ${ET:T:R}
.if ${SRCS:M${_ET}.[ch]} != ""
.ORDER: ${_ET}.h ${_ET}.c
${_ET}.c: .NOMETA
${_ET}.h ${_ET}.c: ${ET}
compile_et ${.ALLSRC}
CLEANFILES+= ${_ET}.h ${_ET}.c
.endif
.endfor
.endfor
.endif # defined(SRCS)
ASN1_COMPILE= asn1_compile
MAKE_ROKEN= make-roken
SLC= slc