1# $FreeBSD$ 2 3.if !defined(DISTRIBUTION) 4 5DISTRIBUTION= krb5 6 7.if !defined(INCLUDEOBJDIR) 8 9INCLUDEDIR= ${.CURDIR}/../../include 10KRB4DIR= ${.CURDIR}/../../../crypto/kerberosIV 11KRB5DIR= ${.CURDIR}/../../../crypto/heimdal 12ROKENDIR= ${.CURDIR}/../../lib/libroken 13 14CFLAGS+=-Wall -I${INCLUDEDIR} -I${INCLUDEOBJDIR} -DHAVE_CONFIG_H 15 16.if defined(KRB5_KRB4_COMPAT) 17CFLAGS+=-DKRB5_KRB4_COMPAT 18.endif 19 20CFLAGS+=-DINET6 21 22.if exists(${.OBJDIR}/../../include) 23INCLUDEOBJDIR= ${.OBJDIR}/../../include 24.else 25INCLUDEOBJDIR= ${.CURDIR}/../../include 26.endif 27 28.if exists(${.OBJDIR}/../../lib/libasn1) 29ASN1OBJDIR= ${.OBJDIR}/../../lib/libasn1 30.else 31ASN1OBJDIR= ${.CURDIR}/../../lib/libasn1 32.endif 33 34.if exists(${.OBJDIR}/../../lib/libhdb) 35HDBOBJDIR= ${.OBJDIR}/../../lib/libhdb 36.else 37HDBOBJDIR= ${.CURDIR}/../../lib/libhdb 38.endif 39 40.if exists(${.OBJDIR}/../../lib/libroken) 41ROKENOBJDIR= ${.OBJDIR}/../../lib/libroken 42.else 43ROKENOBJDIR= ${.CURDIR}/../../lib/libroken 44.endif 45 46.if exists(${.OBJDIR}/../../lib/libkrb4) 47KRB4OBJDIR= ${.OBJDIR}/../../lib/libkrb4 48.else 49KRB4OBJDIR= ${.CURDIR}/../../lib/libkrb4 50.endif 51 52.if exists(${.OBJDIR}/../../lib/libkrb5) 53KRB5OBJDIR= ${.OBJDIR}/../../lib/libkrb5 54.else 55KRB5OBJDIR= ${.CURDIR}/../../lib/libkrb5 56.endif 57 58.if exists(${.OBJDIR}/../../lib/libkadm5clnt) 59KADM5COBJDIR= ${.OBJDIR}/../../lib/libkadm5clnt 60.else 61KADM5COBJDIR= ${.CURDIR}/../../lib/libkadm5clnt 62.endif 63 64.if exists(${.OBJDIR}/../../lib/libkadm5srv) 65KADM5SOBJDIR= ${.OBJDIR}/../../lib/libkadm5srv 66.else 67KADM5SOBJDIR= ${.CURDIR}/../../lib/libkadm5srv 68.endif 69 70.if exists(${.OBJDIR}/../../lib/libkafs5) 71KAFS5OBJDIR= ${.OBJDIR}/../../lib/libkafs5 72.else 73KAFS5OBJDIR= ${.CURDIR}/../../lib/libkafs5 74.endif 75 76.if exists(${.OBJDIR}/../../lib/libkrb5util) 77KRB5UTILOBJDIR= ${.OBJDIR}/../../lib/libkrb5util 78.else 79KRB5UTILOBJDIR= ${.CURDIR}/../../lib/libkrb5util 80.endif 81 82.if exists(${.OBJDIR}/../../lib/libkdb5) 83KDB5OBJDIR= ${.OBJDIR}/../../lib/libkdb5 84.else 85KDB5OBJDIR= ${.CURDIR}/../../lib/libkdb5 86.endif 87 88.if exists(${.OBJDIR}/../../lib/libsl) 89SLOBJDIR= ${.OBJDIR}/../../lib/libsl 90.else 91SLOBJDIR= ${.CURDIR}/../../lib/libsl 92.endif 93 94COMPILE_ET= compile_et 95 96.ORDER: asn1_err.c asn1_err.h 97asn1_err.c asn1_err.h: ${KRB5DIR}/lib/asn1/asn1_err.et 98 test -e ${.OBJDIR}/asn1_err.et || ln -sf ${.ALLSRC} 99 ${COMPILE_ET} asn1_err.et 100 101CLEANFILES+=asn1_err.h asn1_err.c asn1_err.et 102 103.ORDER: hdb_err.c hdb_err.h 104hdb_err.c hdb_err.h: ${KRB5DIR}/lib/hdb/hdb_err.et 105 test -e ${.OBJDIR}/hdb_err.et || ln -sf ${.ALLSRC} 106 ${COMPILE_ET} hdb_err.et 107 108CLEANFILES+=hdb_err.h hdb_err.c hdb_err.et 109 110.ORDER: heim_err.c heim_err.h 111heim_err.c heim_err.h: ${KRB5DIR}/lib/krb5/heim_err.et 112 test -e ${.OBJDIR}/heim_err.et || ln -sf ${.ALLSRC} 113 ${COMPILE_ET} heim_err.et 114 115CLEANFILES+=heim_err.h heim_err.c heim_err.et 116 117.ORDER: krb5_err.c krb5_err.h 118krb5_err.c krb5_err.h: ${KRB5DIR}/lib/krb5/krb5_err.et 119 test -e ${.OBJDIR}/krb5_err.et || ln -sf ${.ALLSRC} 120 ${COMPILE_ET} krb5_err.et 121 122CLEANFILES+=krb5_err.h krb5_err.c krb5_err.et 123 124.ORDER: kadm5_err.c kadm5_err.h 125kadm5_err.c kadm5_err.h: \ 126 ${KRB5DIR}/lib/kadm5/kadm5_err.et 127 test -e ${.OBJDIR}/kadm5_err.et || ln -sf ${.ALLSRC} 128 ${COMPILE_ET} kadm5_err.et 129 130CLEANFILES+=kadm5_err.h kadm5_err.c kadm5_err.et 131 132.if defined(INCLUDES) 133beforeinstall: ${INCLUDES} 134.for INC in ${INCLUDES} 135 ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \ 136 ${INC} ${DESTDIR}/usr/include 137.endfor 138.endif 139 140roken.h: make-roken 141 ./make-roken > tmp.h ;\ 142 if [ -f roken.h ] && cmp -s tmp.h roken.h ; then rm -f tmp.h ; \ 143 else rm -f roken.h; mv tmp.h roken.h; fi 144 145make-roken.c: ${KRB5DIR}/lib/roken/roken.awk ${KRB5DIR}/lib/roken/roken.h.in 146 awk -f ${.ALLSRC} > ${.TARGET} 147 148CLEANFILES+= make-roken.c make-roken roken.h 149 150.else 151 152INCLUDEDIR= ${.CURDIR}/../../include 153KRB4DIR= ${.CURDIR}/../../crypto/kerberosIV 154KRB5DIR= ${.CURDIR}/../../crypto/heimdal 155ROKENDIR= ${.CURDIR}/../../lib/libroken 156 157.endif 158 159.endif 160