Expand PMF_FN_* macros.
[netbsd-mini2440.git] / lib / libhdb / Makefile
blobc7851cbddc55859304d3708887e716e9b5a5f1db
1 # $NetBSD: Makefile,v 1.23 2008/08/03 07:16:58 veego Exp $
3 USE_FORT?= yes # network protocol library
5 NOLINT= # defined
7 .include <bsd.own.mk>
9 DIST= ${NETBSDSRCDIR}/crypto/dist
10 .PATH: ${DIST}/heimdal/lib/hdb
12 WARNS?= 1
14 LIB= hdb
16 LIBDPLIBS+= krb5 ${.CURDIR}/../libkrb5 \
17 asn1 ${.CURDIR}/../libasn1 \
18 roken ${.CURDIR}/../libroken
20 .if ${USETOOLS} != "yes"
21 COMPILEETOBJ!= cd ${NETBSDSRCDIR}/lib/libcom_err/compile_et && ${PRINTOBJDIR}
22 TOOL_COMPILE_ET= ${COMPILEETOBJ}/compile_et
24 ASN1COMPILEOBJ!= cd ${NETBSDSRCDIR}/lib/libasn1/asn1_compile && ${PRINTOBJDIR}
25 TOOL_ASN1_COMPILE= ${ASN1COMPILEOBJ}/asn1_compile
26 .endif
28 hdb_err.c hdb_err.h: hdb_err.et ${TOOL_COMPILE_ET}
29 ${TOOL_COMPILE_ET} ${DIST}/heimdal/lib/hdb/hdb_err.et
31 ERR_FILES= hdb_err.c
33 gen_files= \
34 asn1_Salt.x \
35 asn1_Key.x \
36 asn1_Event.x \
37 asn1_HDBFlags.x \
38 asn1_GENERATION.x \
39 asn1_HDB_Ext_PKINIT_acl.x \
40 asn1_HDB_Ext_PKINIT_hash.x \
41 asn1_HDB_Ext_Constrained_delegation_acl.x \
42 asn1_HDB_Ext_Lan_Manager_OWF.x \
43 asn1_HDB_Ext_Password.x \
44 asn1_HDB_Ext_Aliases.x \
45 asn1_HDB_extension.x \
46 asn1_HDB_extensions.x \
47 asn1_hdb_entry.x \
48 asn1_hdb_entry_alias.x
50 DPSRCS= hdb_asn1.h hdb_err.h
52 BUILT_SOURCES= ${gen_files:.x=.c} hdb_err.c
54 SRCS= \
55 common.c \
56 db.c \
57 db3.c \
58 ext.c \
59 hdb-ldap.c \
60 hdb.c \
61 keys.c \
62 keytab.c \
63 dbinfo.c \
64 mkey.c \
65 ndbm.c \
66 print.c \
67 $(BUILT_SOURCES)
69 INCS= hdb.h hdb-protos.h hdb_err.h hdb_asn1.h
70 INCSDIR= /usr/include/krb5
72 hdb_asn1_files: hdb.asn1 ${TOOL_ASN1_COMPILE}
73 ${TOOL_ASN1_COMPILE} ${DIST}/heimdal/lib/hdb/hdb.asn1 hdb_asn1
75 ASN1!= cd ${NETBSDSRCDIR}/lib/libasn1 && ${PRINTOBJDIR}
76 KRB5!= cd ${NETBSDSRCDIR}/lib/libkrb5 && ${PRINTOBJDIR}
78 CPPFLAGS+= -I. \
79 -I${DIST}/heimdal/lib/hdb \
80 -I${ASN1} \
81 -I${KRB5} \
82 -I${DIST}/heimdal/lib/krb5 \
83 -I${DIST}/heimdal/lib/asn1 \
84 -I${DIST}/heimdal/lib/com_err \
85 -I${NETBSDSRCDIR}/include/heimdal \
86 -I${NETBSDSRCDIR}/lib/libroken \
87 -I${DIST}/heimdal/lib/roken \
88 -DHDB_DB_DIR=\"/var/heimdal\" \
89 -DHAVE_CONFIG_H
91 .if (${USE_INET6} != "no")
92 CPPFLAGS+=-DHAVE_IPV6
93 .endif
95 .if defined(HAVE_GCC) && ${HAVE_GCC} == 4
96 .for f in mkey
97 COPTS.${f}.c+= -Wno-pointer-sign
98 .endfor
99 .endif
101 ${gen_files} hdb_asn1.hx: hdb_asn1_files
103 CLEANFILES= ${gen_files} ${BUILT_SOURCES} \
104 hdb_asn1.h hdb_asn1.hx hdb_asn1_files hdb_err.h
106 .include <bsd.lib.mk>
108 .SUFFIXES: .hx .x
110 .hx.h:
111 @cmp -s $< $@ 2> /dev/null || cp $< $@
113 .x.c:
114 @cmp -s $< $@ 2> /dev/null || cp $< $@