Do not run mandoc for lintmanpages if MANPAGES is empty.
[netbsd-mini2440.git] / lib / libhx509 / Makefile
blobec7b1a709c1e9ba0c6f43f61368a1e57285049a2
1 # $NetBSD: Makefile,v 1.5 2008/10/27 07:26:55 mrg Exp $
3 USE_FORT?= yes # cryptographic software
5 NOLINT= # defined
7 .include <bsd.own.mk>
9 DIST= ${NETBSDSRCDIR}/crypto/dist
10 .PATH: ${DIST}/heimdal/lib/hx509 ${DIST}/heimdal/lib/hx509/ref
12 WARNS?= 1
14 LIB= hx509
16 LIBDPLIBS+= crypto ${.CURDIR}/../../crypto/external/bsd/openssl/lib/libcrypto \
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 hx509_err.c hx509_err.h: hx509_err.et ${TOOL_COMPILE_ET}
29 ${TOOL_COMPILE_ET} ${DIST}/heimdal/lib/hx509/hx509_err.et
31 ERR_FILES= hx509_err.c
33 gen_files_ocsp= \
34 asn1_OCSPBasicOCSPResponse.x \
35 asn1_OCSPCertID.x \
36 asn1_OCSPCertStatus.x \
37 asn1_OCSPInnerRequest.x \
38 asn1_OCSPKeyHash.x \
39 asn1_OCSPRequest.x \
40 asn1_OCSPResponderID.x \
41 asn1_OCSPResponse.x \
42 asn1_OCSPResponseBytes.x \
43 asn1_OCSPResponseData.x \
44 asn1_OCSPResponseStatus.x \
45 asn1_OCSPSignature.x \
46 asn1_OCSPSingleResponse.x \
47 asn1_OCSPTBSRequest.x \
48 asn1_OCSPVersion.x \
49 asn1_id_pkix_ocsp.x \
50 asn1_id_pkix_ocsp_basic.x \
51 asn1_id_pkix_ocsp_nonce.x
53 gen_files_pkcs10= \
54 asn1_CertificationRequestInfo.x \
55 asn1_CertificationRequest.x
57 gen_files_crmf= \
58 asn1_CRMFRDNSequence.x \
59 asn1_CertReqMessages.x \
60 asn1_CertReqMsg.x \
61 asn1_CertRequest.x \
62 asn1_CertTemplate.x \
63 asn1_Controls.x \
64 asn1_PBMParameter.x \
65 asn1_PKMACValue.x \
66 asn1_POPOPrivKey.x \
67 asn1_POPOSigningKey.x \
68 asn1_POPOSigningKeyInput.x \
69 asn1_ProofOfPossession.x \
70 asn1_SubsequentMessage.x
73 DPSRCS= ocsp_asn1.h pkcs10_asn1.h crmf_asn1.h hx509_err.h
75 BUILT_SOURCES= \
76 ${gen_files_ocsp:.x=.c} \
77 ${gen_files_pkcs10:.x=.c} \
78 ${ERR_FILES}
80 SRCS= \
81 ca.c \
82 cert.c \
83 cms.c \
84 collector.c \
85 crypto.c \
86 doxygen.c \
87 error.c \
88 env.c \
89 file.c \
90 keyset.c \
91 ks_dir.c \
92 ks_file.c \
93 ks_mem.c \
94 ks_null.c \
95 ks_p11.c \
96 ks_p12.c \
97 ks_keychain.c \
98 lock.c \
99 name.c \
100 peer.c \
101 print.c \
102 softp11.c \
103 req.c \
104 revoke.c \
105 $(BUILT_SOURCES)
107 INCS= hx509.h hx509_err.h \
108 ocsp_asn1.h pkcs10_asn1.h crmf_asn1.h \
109 hx509-protos.h hx509-private.h
110 INCSDIR= /usr/include/krb5
112 ocsp_asn1_files: ocsp.asn1 ${TOOL_ASN1_COMPILE}
113 ${TOOL_ASN1_COMPILE} \
114 --preserve-binary=OCSPTBSRequest \
115 --preserve-binary=OCSPResponseData \
116 ${DIST}/heimdal/lib/hx509/ocsp.asn1 ocsp_asn1
117 pkcs10_asn1_files: pkcs10.asn1 ${TOOL_ASN1_COMPILE}
118 ${TOOL_ASN1_COMPILE} \
119 --preserve-binary=CertificationRequestInfo \
120 ${DIST}/heimdal/lib/hx509/pkcs10.asn1 pkcs10_asn1
121 crmf_asn1_files: crmf.asn1 ${TOOL_ASN1_COMPILE}
122 ${TOOL_ASN1_COMPILE} ${DIST}/heimdal/lib/hx509/crmf.asn1 crmf_asn1
124 ASN1!= cd ${NETBSDSRCDIR}/lib/libasn1 && ${PRINTOBJDIR}
125 KRB5!= cd ${NETBSDSRCDIR}/lib/libkrb5 && ${PRINTOBJDIR}
127 CPPFLAGS+= -I. \
128 -I${DIST}/heimdal/lib/hx509 \
129 -I${DIST}/heimdal/lib/hx509/ref \
130 -I${ASN1} \
131 -I${KRB5} \
132 -I${DIST}/heimdal/lib/asn1 \
133 -I${DIST}/heimdal/lib/com_err \
134 -I${NETBSDSRCDIR}/include/heimdal \
135 -I${NETBSDSRCDIR}/lib/libroken \
136 -I${DIST}/heimdal/lib/roken \
137 -DHAVE_CONFIG_H
139 .if (${USE_INET6} != "no")
140 CPPFLAGS+=-DHAVE_IPV6
141 .endif
143 .if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
144 .for f in mkey
145 COPTS.${f}.c+= -Wno-pointer-sign
146 .endfor
147 .endif
149 ${gen_files_ocsp} ocsp_asn1.hx: ocsp_asn1_files
150 ${gen_files_pkcs10} pkcs10_asn1.hx: pkcs10_asn1_files
151 ${gen_files_crmf} crmf_asn1.hx: crmf_asn1_files
153 CLEANFILES= ${gen_files_ocsp} ${gen_files_pkcs10} ${gen_files_crmf} \
154 ${BUILT_SOURCES} \
155 ocsp_asn1_files ocsp_asn1.h ocsp_asn1.hx \
156 pkcs10_asn1_files pkcs10_asn1.h pkcs10_asn1.hx \
157 crmf_asn1_files crmf_asn1.h crmf_asn1.hx \
158 hx509_err.h
160 .include <bsd.lib.mk>
162 .SUFFIXES: .hx .x
164 .hx.h:
165 @cmp -s $< $@ 2> /dev/null || cp $< $@
167 .x.c:
168 @cmp -s $< $@ 2> /dev/null || cp $< $@