09e0bdb48ce51f193e9a2974223d46704b6c44fb
[dragonfly.git] / kerberos5 / Makefile.inc
1 # $FreeBSD: src/kerberos5/Makefile.inc,v 1.5.2.5 2002/07/25 09:33:14 ru Exp $
2 # $DragonFly: src/kerberos5/Makefile.inc,v 1.5 2004/03/26 21:58:09 dillon Exp $
3
4 DISTRIBUTION?=  krb5
5
6 .if !defined(INCLUDEOBJDIR)
7
8 KRB5DIR=        ${.CURDIR}/../../../crypto/heimdal
9 ROKENDIR=       ${.CURDIR}/../../lib/libroken
10 TELNETDIR=      ${.CURDIR}/../../../crypto/telnet
11
12 CFLAGS+=-Wall -I${INCLUDEOBJDIR} -DHAVE_CONFIG_H
13
14 CFLAGS+=-DINET6
15
16 .if exists(${.OBJDIR}/../../include)
17 INCLUDEOBJDIR=  ${.OBJDIR}/../../include
18 .else
19 INCLUDEOBJDIR=  ${.CURDIR}/../../include
20 .endif
21
22 .if exists(${.OBJDIR}/../../lib/libasn1)
23 ASN1OBJDIR=     ${.OBJDIR}/../../lib/libasn1
24 .else
25 ASN1OBJDIR=     ${.CURDIR}/../../lib/libasn1
26 .endif
27
28 .if exists(${.OBJDIR}/../../lib/libhdb)
29 HDBOBJDIR=      ${.OBJDIR}/../../lib/libhdb
30 .else
31 HDBOBJDIR=      ${.CURDIR}/../../lib/libhdb
32 .endif
33
34 .if exists(${.OBJDIR}/../../lib/libroken)
35 ROKENOBJDIR=    ${.OBJDIR}/../../lib/libroken
36 .else
37 ROKENOBJDIR=    ${.CURDIR}/../../lib/libroken
38 .endif
39
40 .if exists(${.OBJDIR}/../../lib/libvers)
41 VERSOBJDIR=     ${.OBJDIR}/../../lib/libvers
42 .else
43 VERSOBJDIR=     ${.CURDIR}/../../lib/libvers
44 .endif
45
46 .if exists(${.OBJDIR}/../../lib/libkrb5)
47 KRB5OBJDIR=     ${.OBJDIR}/../../lib/libkrb5
48 .else
49 KRB5OBJDIR=     ${.CURDIR}/../../lib/libkrb5
50 .endif
51
52 .if exists(${.OBJDIR}/../../lib/libkadm5clnt)
53 KADM5COBJDIR=   ${.OBJDIR}/../../lib/libkadm5clnt
54 .else
55 KADM5COBJDIR=   ${.CURDIR}/../../lib/libkadm5clnt
56 .endif
57
58 .if exists(${.OBJDIR}/../../lib/libkadm5srv)
59 KADM5SOBJDIR=   ${.OBJDIR}/../../lib/libkadm5srv
60 .else
61 KADM5SOBJDIR=   ${.CURDIR}/../../lib/libkadm5srv
62 .endif
63
64 .if exists(${.OBJDIR}/../../lib/libkafs5)
65 KAFS5OBJDIR=    ${.OBJDIR}/../../lib/libkafs5
66 .else
67 KAFS5OBJDIR=    ${.CURDIR}/../../lib/libkafs5
68 .endif
69
70 .if exists(${.OBJDIR}/../../lib/libkrb5util)
71 KRB5UTILOBJDIR= ${.OBJDIR}/../../lib/libkrb5util
72 .else
73 KRB5UTILOBJDIR= ${.CURDIR}/../../lib/libkrb5util
74 .endif
75
76 .if exists(${.OBJDIR}/../../lib/libkdb5)
77 KDB5OBJDIR=     ${.OBJDIR}/../../lib/libkdb5
78 .else
79 KDB5OBJDIR=     ${.CURDIR}/../../lib/libkdb5
80 .endif
81
82 .if exists(${.OBJDIR}/../../lib/libsl)
83 SLOBJDIR=       ${.OBJDIR}/../../lib/libsl
84 .else
85 SLOBJDIR=       ${.CURDIR}/../../lib/libsl
86 .endif
87
88 .if exists(${.OBJDIR}/../../lib/libtelnet)
89 LIBTELNET=      ${.OBJDIR}/../../lib/libtelnet/libtelnet.a
90 .else
91 LIBTELNET=      ${.CURDIR}/../../lib/libtelnet/libtelnet.a
92 .endif
93
94 COMPILE_ET=     compile_et
95
96 .ORDER: asn1_err.c asn1_err.h
97 asn1_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
101 CLEANFILES+=asn1_err.h asn1_err.c asn1_err.et
102
103 .ORDER: hdb_err.c hdb_err.h
104 hdb_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
108 CLEANFILES+=hdb_err.h hdb_err.c hdb_err.et
109
110 .ORDER: heim_err.c heim_err.h
111 heim_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
115 CLEANFILES+=heim_err.h heim_err.c heim_err.et
116
117 krb5_err.c krb5_err.h: ${KRB5DIR}/lib/krb5/krb5_err.et
118         test -e ${.OBJDIR}/krb5_err.et || ln -sf ${.ALLSRC}
119         ${COMPILE_ET} krb5_err.et
120 .ORDER: krb5_err.c krb5_err.h
121
122 CLEANFILES+=krb5_err.h krb5_err.c krb5_err.et
123
124 kadm5_err.c kadm5_err.h: \
125         ${KRB5DIR}/lib/kadm5/kadm5_err.et
126         test -e ${.OBJDIR}/kadm5_err.et || ln -sf ${.ALLSRC}
127         ${COMPILE_ET} kadm5_err.et
128 .ORDER: kadm5_err.c kadm5_err.h
129
130 CLEANFILES+=kadm5_err.h kadm5_err.c kadm5_err.et
131
132 .ORDER: k524_err.c k524_err.h
133 k524_err.c k524_err.h: \
134         ${KRB5DIR}/lib/krb5/k524_err.et
135         test -e ${.OBJDIR}/k524_err.et || ln -sf ${.ALLSRC}
136         ${COMPILE_ET} k524_err.et
137
138 CLEANFILES+=k524_err.h k524_err.c k524_err.et
139
140 roken.h: make-roken.nx
141         ./make-roken.nx > 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
145 make-roken.c: ${KRB5DIR}/lib/roken/roken.awk ${KRB5DIR}/lib/roken/roken.h.in
146         awk -f ${.ALLSRC} > ${.TARGET}
147
148 make-roken.nx: make-roken.c
149         ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC} ${NXLDLIBS} -o ${.TARGET}
150
151 CLEANFILES+=    make-roken.c make-roken.nx roken.h
152
153 .else
154
155 KRB5DIR=        ${.CURDIR}/../../crypto/heimdal
156 ROKENDIR=       ${.CURDIR}/../../lib/libroken
157
158 .endif