1# $FreeBSD$ 2 3LIB= hdb 4CFLAGS+=-I${KRB5DIR}/include \ 5 -I${INCLUDEOBJDIR} \ 6 -I${KRB5DIR}/lib/krb5 \ 7 -I${KRB5DIR}/lib/hdb \ 8 -I${KRB5DIR}/lib/asn1 \ 9 -I${KRB5DIR}/lib/roken \ 10 -I${.OBJDIR} \ 11 -I${ASN1OBJDIR} 12 13SRCS= \ 14 common.c \ 15 db.c \ 16 db3.c \ 17 hdb-ldap.c \ 18 hdb.c \ 19 keytab.c \ 20 mkey.c \ 21 ndbm.c \ 22 print.c \ 23 hdb_err.c \ 24 hdb_err.h \ 25 hdb_asn1.h \ 26 k524_err.h \ 27 krb5_err.h \ 28 heim_err.h \ 29 ${GEN:S/.x/.c/g} 30 31GEN= \ 32 asn1_Key.x \ 33 asn1_GENERATION.x \ 34 asn1_Event.x \ 35 asn1_HDBFlags.x \ 36 asn1_hdb_entry.x \ 37 asn1_Salt.x 38 39.include <bsd.lib.mk> 40 41.PATH: ${KRB5DIR}/lib/hdb 42.PATH: ${KRB5DIR}/lib/asn1 43.PATH: ${KRB5DIR}/lib/vers 44.PATH: ${KRB5DIR}/lib/roken 45 46build-tools: make-print-version asn1_compile 47 48.for I in ${GEN} 49${I:S/.x/.c/}: ${I} 50 cmp -s ${.OODATE} ${.TARGET} 2> /dev/null || cp ${.OODATE} ${.TARGET} 51.endfor 52 53CLEANFILES+= ${GEN:S/.x/.c/g} hdb_asn1.h asn1_files 54 55${GEN} hdb_asn1.h: asn1_compile hdb.asn1 56 ./asn1_compile ${KRB5DIR}/lib/hdb/hdb.asn1 hdb_asn1 57 58asn1_compile: parse.o lex.o main.c hash.c symbol.c emalloc.c gen.c \ 59 gen_encode.c gen_decode.c gen_free.c gen_length.c \ 60 gen_copy.c gen_glue.c getarg.c warnerr.c print_version.o \ 61 get_window_size.c strupr.c 62 ${CC} ${CFLAGS} ${.OODATE} -o ${.TARGET} 63 64parse.o: parse.c 65 66parse.h parse.c: parse.y 67 ${YACC} -d ${.OODATE} 68 cp y.tab.c parse.c 69 cp y.tab.h parse.h 70 71lex.o: lex.l 72 73print_version.o: print_version.h print_version.c 74 ${CC} ${CFLAGS} -c -o ${.TARGET} ${KRB5DIR}/lib/vers/print_version.c 75 76print_version.h: make-print-version 77 ./make-print-version print_version.h 78 79make-print-version: make-print-version.c 80 ${CC} ${CFLAGS} -static -o ${.TARGET} ${.OODATE} 81 82CLEANFILES+= ${GEN} asn1_compile lex.o parse.o parse.c parse.h \ 83 hdb_asn1.h make-print-version print_version.h print_version.o \ 84 y.tab.c y.tab.h 85