Makefile revision 72450
1# $FreeBSD: head/kerberos5/lib/libasn1/Makefile 72450 2001-02-13 16:57:04Z assar $
2
3LIB=	asn1
4CFLAGS+=-I${KRB5DIR}/include \
5	-I${KRB5DIR}/lib/asn1 \
6	-I${KRB5DIR}/lib/roken \
7	-I${INCLUDEOBJDIR} \
8	-I${.OBJDIR}
9SRCS=	der_get.c der_put.c der_free.c der_length.c der_copy.c \
10	timegm.c asn1_err.c asn1_err.h asn1.h roken.h \
11	${GEN:S/.x/.c/g}
12
13GEN=						\
14	asn1_APOptions.x			\
15	asn1_AP_REP.x				\
16	asn1_AP_REQ.x				\
17	asn1_AS_REP.x				\
18	asn1_AS_REQ.x				\
19	asn1_Authenticator.x			\
20	asn1_AuthorizationData.x		\
21	asn1_CKSUMTYPE.x			\
22	asn1_Checksum.x				\
23	asn1_ETYPE_INFO.x			\
24	asn1_ETYPE_INFO_ENTRY.x			\
25	asn1_EncAPRepPart.x			\
26	asn1_EncASRepPart.x			\
27	asn1_EncKDCRepPart.x			\
28	asn1_EncKrbCredPart.x			\
29	asn1_EncKrbPrivPart.x			\
30	asn1_EncTGSRepPart.x			\
31	asn1_EncTicketPart.x			\
32	asn1_EncryptedData.x			\
33	asn1_EncryptionKey.x			\
34	asn1_HostAddress.x			\
35	asn1_HostAddresses.x			\
36	asn1_KDCOptions.x			\
37	asn1_KDC_REP.x				\
38	asn1_KDC_REQ.x				\
39	asn1_KDC_REQ_BODY.x			\
40	asn1_KRB_CRED.x				\
41	asn1_KRB_ERROR.x			\
42	asn1_KRB_PRIV.x				\
43	asn1_KRB_SAFE.x				\
44	asn1_KRB_SAFE_BODY.x			\
45	asn1_KerberosTime.x			\
46	asn1_KrbCredInfo.x			\
47	asn1_LastReq.x				\
48	asn1_MESSAGE_TYPE.x			\
49	asn1_METHOD_DATA.x			\
50	asn1_NAME_TYPE.x			\
51	asn1_PADATA_TYPE.x			\
52	asn1_PA_DATA.x				\
53	asn1_PA_ENC_TS_ENC.x			\
54	asn1_Principal.x			\
55	asn1_PrincipalName.x			\
56	asn1_Realm.x				\
57	asn1_TGS_REP.x				\
58	asn1_TGS_REQ.x				\
59	asn1_Ticket.x				\
60	asn1_TicketFlags.x			\
61	asn1_TransitedEncoding.x		\
62	asn1_UNSIGNED.x
63
64INCLUDES=asn1.h asn1_err.h 
65
66.include <bsd.lib.mk>
67
68.PATH:		${KRB5DIR}/lib/asn1
69.PATH:		${KRB5DIR}/lib/roken
70.ORDER:		parse.o lex.o
71
72build-tools:	make-print-version asn1_compile
73
74beforedepend all: roken.h
75
76.for I in ${GEN}
77${I:S/.x/.c/}:	${I}
78	cmp -s ${.OODATE} ${.TARGET} 2> /dev/null || cp ${.OODATE} ${.TARGET}
79.endfor
80
81CLEANFILES+=	${GEN:S/.x/.c/g} asn1.h asn1_files
82
83${GEN} asn1.h:		asn1_compile k5.asn1
84	./asn1_compile ${KRB5DIR}/lib/asn1/k5.asn1
85
86build-tools:	make-print-version asn1_compile
87
88asn1_compile:	parse.o lex.o main.c hash.c symbol.c gen.c \
89		gen_encode.c gen_decode.c gen_free.c gen_length.c \
90		gen_copy.c gen_glue.c getarg.c warnerr.c print_version.o \
91		get_window_size.c strupr.c
92	${CC} ${CFLAGS} ${.OODATE} -o ${.TARGET}
93
94parse.o:	parse.c roken.h
95
96parse.h parse.c:	parse.y
97	${YACC}	-d ${.OODATE}
98	mv y.tab.c parse.c
99	mv y.tab.h parse.h
100
101lex.o:		lex.l
102
103print_version.o: print_version.h print_version.c roken.h
104	${CC} ${CFLAGS} -c -o ${.TARGET} ${KRB5DIR}/lib/roken/print_version.c
105
106print_version.h: make-print-version
107	./make-print-version print_version.h
108
109make-print-version: make-print-version.c
110	${CC} ${CFLAGS} -static -o ${.TARGET} ${.OODATE}
111
112CLEANFILES+=	${GEN} asn1_compile lex.o parse.o parse.c parse.h \
113		hdb_asn1.h make-print-version print_version.h print_version.o
114