dd82fa7a26558cad33680f0596a0429c9d375089
[dragonfly.git] / kerberos5 / lib / libasn1 / Makefile
1 # $FreeBSD: src/kerberos5/lib/libasn1/Makefile,v 1.3.2.8 2002/08/19 16:10:21 ru Exp $
2 # $DragonFly: src/kerberos5/lib/libasn1/Makefile,v 1.4 2004/03/26 21:58:10 dillon Exp $
3
4 LIB=    asn1
5 CFLAGS+=-I${KRB5DIR}/include \
6         -I${KRB5DIR}/lib/asn1 \
7         -I${KRB5DIR}/lib/roken \
8         -I${INCLUDEOBJDIR} \
9         -I${.OBJDIR}
10 SRCS=   der_get.c der_put.c der_free.c der_length.c der_copy.c \
11         timegm.c asn1_err.c asn1_err.h krb5_asn1.h roken.h \
12         ${GEN:S/.x/.c/g}
13
14 GEN=                                            \
15         asn1_APOptions.x                        \
16         asn1_AP_REP.x                           \
17         asn1_AP_REQ.x                           \
18         asn1_AS_REP.x                           \
19         asn1_AS_REQ.x                           \
20         asn1_Authenticator.x                    \
21         asn1_AuthorizationData.x                \
22         asn1_CKSUMTYPE.x                        \
23         asn1_Checksum.x                         \
24         asn1_ENCTYPE.x                          \
25         asn1_ETYPE_INFO.x                       \
26         asn1_ETYPE_INFO_ENTRY.x                 \
27         asn1_EncAPRepPart.x                     \
28         asn1_EncASRepPart.x                     \
29         asn1_EncKDCRepPart.x                    \
30         asn1_EncKrbCredPart.x                   \
31         asn1_EncKrbPrivPart.x                   \
32         asn1_EncTGSRepPart.x                    \
33         asn1_EncTicketPart.x                    \
34         asn1_EncryptedData.x                    \
35         asn1_EncryptionKey.x                    \
36         asn1_HostAddress.x                      \
37         asn1_HostAddresses.x                    \
38         asn1_KDCOptions.x                       \
39         asn1_KDC_REP.x                          \
40         asn1_KDC_REQ.x                          \
41         asn1_KDC_REQ_BODY.x                     \
42         asn1_KRB_CRED.x                         \
43         asn1_KRB_ERROR.x                        \
44         asn1_KRB_PRIV.x                         \
45         asn1_KRB_SAFE.x                         \
46         asn1_KRB_SAFE_BODY.x                    \
47         asn1_KerberosTime.x                     \
48         asn1_KrbCredInfo.x                      \
49         asn1_LastReq.x                          \
50         asn1_LR_TYPE.x                          \
51         asn1_MESSAGE_TYPE.x                     \
52         asn1_METHOD_DATA.x                      \
53         asn1_NAME_TYPE.x                        \
54         asn1_PADATA_TYPE.x                      \
55         asn1_PA_DATA.x                          \
56         asn1_PA_ENC_TS_ENC.x                    \
57         asn1_Principal.x                        \
58         asn1_PrincipalName.x                    \
59         asn1_Realm.x                            \
60         asn1_TGS_REP.x                          \
61         asn1_TGS_REQ.x                          \
62         asn1_Ticket.x                           \
63         asn1_TicketFlags.x                      \
64         asn1_TransitedEncoding.x                \
65         asn1_UNSIGNED.x
66
67 INCS=   krb5_asn1.h asn1_err.h 
68
69 .include <bsd.lib.mk>
70
71 .PATH:          ${KRB5DIR}/lib/asn1
72 .PATH:          ${KRB5DIR}/lib/vers
73 .PATH:          ${KRB5DIR}/lib/roken
74
75 beforedepend all: roken.h
76
77 .for I in ${GEN}
78 ${I:S/.x/.c/}:  ${I}
79         cmp -s ${.OODATE} ${.TARGET} 2> /dev/null || cp ${.OODATE} ${.TARGET}
80 .endfor
81
82 CLEANFILES+=    ${GEN:S/.x/.c/g} krb5_asn1.h asn1_files
83
84 ${GEN} krb5_asn1.h:             asn1_compile.nx k5.asn1
85         ./asn1_compile.nx ${KRB5DIR}/lib/asn1/k5.asn1 krb5_asn1
86
87 build-tools:    make-print-version.nx make-roken.nx asn1_compile.nx
88
89 asn1_compile.nx:                                \
90         gen.c                                   \
91         gen_copy.c                              \
92         gen_decode.c                            \
93         gen_encode.c                            \
94         gen_free.c                              \
95         gen_glue.c                              \
96         gen_length.c                            \
97         hash.c                                  \
98         emalloc.c                               \
99         lex.no                                  \
100         main.c                                  \
101         parse.no                                \
102         symbol.c                                \
103         getarg.c                                \
104         warnerr.c                               \
105         print_version.no                        \
106         get_window_size.c                       \
107         strupr.c
108         ${NXCC} ${NXCFLAGS} ${.ALLSRC} -o ${.TARGET}
109
110 .if defined(BOOTSTRAPPING)
111 asn1_compile.nx: getprogname.c setprogname.c
112 .endif
113
114 parse.no:       parse.c roken.h
115         ${NXCC} ${NXCFLAGS} -c -o ${.TARGET} parse.c
116
117 .ORDER: parse.c parse.h
118 parse.h parse.c:        parse.y
119         ${YACC} -d ${.OODATE}
120         cp y.tab.c parse.c
121         cp y.tab.h parse.h
122
123 lex.no:         lex.l parse.h roken.h
124         ${LEX} ${LFLAGS} -o${.TARGET}.c ${.ALLSRC:M*.l}
125         ${NXCC} ${CFLAGS} -c ${.TARGET}.c -o ${.TARGET}
126         rm -f ${.TARGET}.c
127
128 print_version.no: print_version.h print_version.c roken.h
129         ${NXCC} ${NXCFLAGS} -c -o ${.TARGET} ${KRB5DIR}/lib/vers/print_version.c
130
131 print_version.h: make-print-version.nx
132         ./make-print-version.nx print_version.h
133
134 make-print-version.nx: make-print-version.c
135         ${NXCC} ${NXCFLAGS} ${NXLDFLAGS} ${.ALLSRC} ${NXLDLIBS} -o ${.TARGET}
136
137 CLEANFILES+=    ${GEN} asn1_compile.nx lex.no parse.no parse.c parse.h \
138                 hdb_asn1.h make-print-version.nx print_version.h \
139                 print_version.no y.tab.c y.tab.h