Redo argv processing to better conform to standards. A NULL argv is no
[dragonfly.git] / kerberos5 / Makefile.inc
1 # $FreeBSD: src/kerberos5/Makefile.inc,v 1.24 2004/12/21 09:33:44 ru Exp $
2 # $DragonFly: src/kerberos5/Makefile.inc,v 1.6 2005/01/16 14:25:45 eirikn Exp $
3
4 NO_LINT=
5
6 KRB5DIR=        ${.CURDIR}/../../../crypto/heimdal-0.6.3
7
8 CFLAGS+=        -DHAVE_CONFIG_H -I${.CURDIR}/../../include
9 CFLAGS+=        -DINET6
10
11 .if defined(WITH_OPENLDAP)
12 OPENLDAPBASE?=  /usr/local
13 LDAPLDADD=      -lldap -llber
14 LDAPDPADD=      ${LDAPLDADD:C;^-l(.*)$;${OPENLDAPBASE}/lib/lib\1.a;}
15 LDAPCFLAGS=     -I${OPENLDAPBASE}/include -DOPENLDAP=1
16 LDAPLDFLAGS=    -L${OPENLDAPBASE}/lib -Wl,-rpath,${OPENLDAPBASE}/lib
17 .endif
18
19 .if exists(${.OBJDIR}/../../lib/libvers)
20 LIBVERS=        ${.OBJDIR}/../../lib/libvers/libvers.a
21 .else
22 LIBVERS=        ${.CURDIR}/../../lib/libvers/libvers.a
23 .endif
24
25 .if exists(${.OBJDIR}/../../lib/libsl)
26 LIBSL=          ${.OBJDIR}/../../lib/libsl/libsl.a
27 .else
28 LIBSL=          ${.CURDIR}/../../lib/libsl/libsl.a
29 .endif
30
31 .if exists(${.OBJDIR}/../../tools/make-print-version/make-print-version)
32 MAKEPRINTVERSION=${.OBJDIR}/../../tools/make-print-version/make-print-version
33 .elif exists(${.OBJDIR}/../../bintools/make-print-version/make-print-version)
34 MAKEPRINTVERSION=${.OBJDIR}/../../bintools/make-print-version/make-print-version
35 .else
36 MAKEPRINTVERSION=make-print-version
37 .endif
38 .if exists(${.OBJDIR}/../../tools/make-roken/make-roken)
39 MAKEROKEN=      ${.OBJDIR}/../../tools/make-roken/make-roken
40 .elif exists(${.OBJDIR}/../../bintools/make-roken/make-roken)
41 MAKEROKEN=      ${.OBJDIR}/../../bintools/make-roken/make-roken
42 .else
43 MAKEROKEN=      make-roken
44 .endif
45 .if exists(${.OBJDIR}/../../tools/asn1_compile/asn1_compile)
46 ASN1COMPILE=    ${.OBJDIR}/../../tools/asn1_compile/asn1_compile
47 .elif exists(${.OBJDIR}/../../bintools/asn1_compile/asn1_compile)
48 ASN1COMPILE=    ${.OBJDIR}/../../bintools/asn1_compile/asn1_compile
49 .else
50 ASN1COMPILE=    asn1_compile
51 .endif
52
53 .if defined(SRCS)
54
55 ETSRCS= \
56         ${KRB5DIR}/lib/asn1/asn1_err.et \
57         ${KRB5DIR}/lib/hdb/hdb_err.et \
58         ${KRB5DIR}/lib/kadm5/kadm5_err.et \
59         ${KRB5DIR}/lib/krb5/heim_err.et \
60         ${KRB5DIR}/lib/krb5/k524_err.et \
61         ${KRB5DIR}/lib/krb5/krb5_err.et
62
63 .for ET in ${ETSRCS}
64 .for _ET in ${ET:T:R}
65 .if ${SRCS:M${_ET}.[ch]} != ""
66 .ORDER: ${_ET}.c ${_ET}.h
67 ${_ET}.c ${_ET}.h: ${ET}
68         compile_et ${.ALLSRC}
69 CLEANFILES+=    ${_ET}.h ${_ET}.c
70 .endif
71 .endfor
72 .endfor
73
74 .endif defined(SRCS)