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