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