freebsd-dev/kerberos5/lib/libhdb/Makefile
Warner Losh 30aaff1192 Migrate to a new way of dealing with building from old revisions of
FreeBSD.  This method attempts to centralize all the necessary hacks
or work arounds in one of two places in the tree (src/Makefile.inc1
and src/tools/build).  We build a small compatibility library
(libbuild.a) as well as selectively installing necessary include
files.  We then include this directory when building host binaries.

This removes all the past release compatibilty hacks from various
places in the tree.  We still build on tip of stable and current.  I
will work with those that want to support more, although I anticipate
it will just work.

Many thanks to ru@, obrien@ and jhb@ for providing valuable input at
various stage of implementation, as well as for working together to
positively effect a change for the better.
2003-04-05 20:30:30 +00:00

86 lines
1.9 KiB
Makefile

# $FreeBSD$
LIB= hdb
CFLAGS+=-I${KRB5DIR}/include \
-I${INCLUDEOBJDIR} \
-I${KRB5DIR}/lib/krb5 \
-I${KRB5DIR}/lib/hdb \
-I${KRB5DIR}/lib/asn1 \
-I${KRB5DIR}/lib/roken \
-I${.OBJDIR} \
-I${ASN1OBJDIR}
SRCS= \
common.c \
db.c \
db3.c \
hdb-ldap.c \
hdb.c \
keytab.c \
mkey.c \
ndbm.c \
print.c \
hdb_err.c \
hdb_err.h \
hdb_asn1.h \
k524_err.h \
krb5_err.h \
heim_err.h \
${GEN:S/.x/.c/g}
GEN= \
asn1_Key.x \
asn1_GENERATION.x \
asn1_Event.x \
asn1_HDBFlags.x \
asn1_hdb_entry.x \
asn1_Salt.x
.include <bsd.lib.mk>
.PATH: ${KRB5DIR}/lib/hdb
.PATH: ${KRB5DIR}/lib/asn1
.PATH: ${KRB5DIR}/lib/vers
.PATH: ${KRB5DIR}/lib/roken
build-tools: make-print-version asn1_compile
.for I in ${GEN}
${I:S/.x/.c/}: ${I}
cmp -s ${.OODATE} ${.TARGET} 2> /dev/null || cp ${.OODATE} ${.TARGET}
.endfor
CLEANFILES+= ${GEN:S/.x/.c/g} hdb_asn1.h asn1_files
${GEN} hdb_asn1.h: asn1_compile hdb.asn1
./asn1_compile ${KRB5DIR}/lib/hdb/hdb.asn1 hdb_asn1
asn1_compile: parse.o lex.o main.c hash.c symbol.c emalloc.c gen.c \
gen_encode.c gen_decode.c gen_free.c gen_length.c \
gen_copy.c gen_glue.c getarg.c warnerr.c print_version.o \
get_window_size.c strupr.c
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.OODATE} ${LDADD}
parse.o: parse.c
.ORDER: parse.c parse.h
parse.h parse.c: parse.y
${YACC} -d ${.OODATE}
cp y.tab.c parse.c
cp y.tab.h parse.h
lex.o: lex.l
print_version.o: print_version.h print_version.c
${CC} ${CFLAGS} -c -o ${.TARGET} ${KRB5DIR}/lib/vers/print_version.c
print_version.h: make-print-version
./make-print-version print_version.h
make-print-version: make-print-version.c
${CC} ${CFLAGS} -static -o ${.TARGET} ${.OODATE}
CLEANFILES+= ${GEN} asn1_compile lex.o parse.o parse.c parse.h \
hdb_asn1.h make-print-version print_version.h print_version.o \
y.tab.c y.tab.h