1 ########################################################################
3 # Copyright (c) 2009, Secure Endpoints Inc.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # - Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
13 # - Redistributions in binary form must reproduce the above copyright
14 # notice, this list of conditions and the following disclaimer in
15 # the documentation and/or other materials provided with the
18 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
28 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 # POSSIBILITY OF SUCH DAMAGE.
35 !include ../../windows/NTMakefile.w32
38 $(OBJ)\asn1_OCSPBasicOCSPResponse.x \
39 $(OBJ)\asn1_OCSPCertID.x \
40 $(OBJ)\asn1_OCSPCertStatus.x \
41 $(OBJ)\asn1_OCSPInnerRequest.x \
42 $(OBJ)\asn1_OCSPKeyHash.x \
43 $(OBJ)\asn1_OCSPRequest.x \
44 $(OBJ)\asn1_OCSPResponderID.x \
45 $(OBJ)\asn1_OCSPResponse.x \
46 $(OBJ)\asn1_OCSPResponseBytes.x \
47 $(OBJ)\asn1_OCSPResponseData.x \
48 $(OBJ)\asn1_OCSPResponseStatus.x \
49 $(OBJ)\asn1_OCSPSignature.x \
50 $(OBJ)\asn1_OCSPSingleResponse.x \
51 $(OBJ)\asn1_OCSPTBSRequest.x \
52 $(OBJ)\asn1_OCSPVersion.x \
53 $(OBJ)\asn1_id_pkix_ocsp.x \
54 $(OBJ)\asn1_id_pkix_ocsp_basic.x \
55 $(OBJ)\asn1_id_pkix_ocsp_nonce.x
58 $(OBJ)\asn1_CertificationRequestInfo.x \
59 $(OBJ)\asn1_CertificationRequest.x
62 $(OBJ)\asn1_CRMFRDNSequence.x \
63 $(OBJ)\asn1_CertReqMessages.x \
64 $(OBJ)\asn1_CertReqMsg.x \
65 $(OBJ)\asn1_CertRequest.x \
66 $(OBJ)\asn1_CertTemplate.x \
67 $(OBJ)\asn1_Controls.x \
68 $(OBJ)\asn1_PBMParameter.x \
69 $(OBJ)\asn1_PKMACValue.x \
70 $(OBJ)\asn1_POPOPrivKey.x \
71 $(OBJ)\asn1_POPOSigningKey.x \
72 $(OBJ)\asn1_POPOSigningKeyInput.x \
73 $(OBJ)\asn1_ProofOfPossession.x \
74 $(OBJ)\asn1_SubsequentMessage.x
80 $(OBJ)\collector.obj \
85 $(OBJ)\hx509_err.obj \
96 $(OBJ)\ks_keychain.obj \
104 $(gen_files_ocsp:.x=.obj) \
105 $(gen_files_pkcs10:.x=.obj)
107 $(LIBHX509): $(libhx509_la_OBJS)
110 dist_libhx509_la_SOURCES = \
114 $(SRCDIR)\collector.c \
116 $(SRCDIR)\doxygen.c \
121 $(SRCDIR)\hx_locl.h \
124 $(SRCDIR)\sel-gram.y \
125 $(SRCDIR)\sel-lex.l \
128 $(SRCDIR)\ks_file.c \
130 $(SRCDIR)\ks_null.c \
133 $(SRCDIR)\ks_keychain.c \
138 $(SRCDIR)\softp11.c \
139 $(SRCDIR)\ref\pkcs11.h \
143 AUXCFLAGS=$(AUXCFLAGS) -I$(SRCDIR)\ref -I$(OBJ)
145 asn1_compile=$(BINDIR)\asn1_compile.exe
147 $(gen_files_ocsp:.x=.c): $$(@R).x
149 $(gen_files_pkcs10:.x=.c): $$(@R).x
151 $(gen_files_crmf:.x=.c): $$(@R).x
153 $(gen_files_ocsp) $(OBJ)\ocsp_asn1.hx: $(asn1_compile) ocsp.asn1
156 --preserve-binary=OCSPTBSRequest \
157 --preserve-binary=OCSPResponseData \
158 $(SRCDIR)\ocsp.asn1 ocsp_asn1 \
159 || ( $(RM) -f $(gen_files_ocsp) $(OBJ)\ocsp_asn1.h ; exit /b 1 )
162 $(gen_files_pkcs10) $(OBJ)\pkcs10_asn1.hx: $(asn1_compile) pkcs10.asn1
165 --preserve-binary=CertificationRequestInfo \
166 $(SRCDIR)\pkcs10.asn1 pkcs10_asn1 \
167 || ( $(RM) -f $(gen_files_pkcs10) $(OBJ)\pkcs10_asn1.h ; exit /b 1 )
170 $(gen_files_crmf) $(OBJ)\crmf_asn1.hx: $(asn1_compile) crmf.asn1
172 $(asn1_compile) $(SRCDIR)\crmf.asn1 crmf_asn1 \
173 || ( $(RM) -f $(gen_files_crmf) $(OBJ)\crmf_asn1.h ; exit /b 1 )
178 $(INCDIR)\hx509-protos.h \
179 $(INCDIR)\hx509-private.h \
180 $(INCDIR)\hx509_err.h \
181 $(INCDIR)\ocsp_asn1.h \
182 $(INCDIR)\pkcs10_asn1.h \
183 $(INCDIR)\crmf_asn1.h \
184 $(OBJ)\ocsp_asn1-priv.h \
185 $(OBJ)\pkcs10_asn1-priv.h \
186 $(OBJ)\crmf_asn1-priv.h
188 hxtool.c: $(OBJ)\hxtool-commands.h
190 SLC=$(BINDIR)\slc.exe
192 $(OBJ)\hxtool-commands.c $(OBJ)\hxtool-commands.h: hxtool-commands.in $(SLC)
194 $(CP) $(SRCDIR)\hxtool-commands.in $(OBJ)\hxtool-commands.in
195 $(SLC) hxtool-commands.in
198 $(BINDIR)\hxtool.exe: $(OBJ)\tool\hxtool.obj $(OBJ)\tool\hxtool-commands.obj $(LIBHEIMDAL) $(OBJ)\hxtool-version.res
199 $(EXECONLINK) $(LIBHEIMDAL) $(LIBROKEN) $(LIBSL) $(LIBVERS) $(LIBCOMERR)
202 $(OBJ)\hx509-protos.h:
204 $(PERL) $(SRCDIR)\..\..\cf\make-proto.pl -R "^(_|^C)" -E HX509_LIB -q -P remove -o hx509-protos.h $(dist_libhx509_la_SOURCES) || $(RM) -f hx509-protos.h
207 $(OBJ)\hx509-private.h:
209 $(PERL) $(SRCDIR)\..\..\cf\make-proto.pl -q -P remove -p hx509-private.h $(dist_libhx509_la_SOURCES) || $(RM) -f hx509-private.h
212 $(OBJ)\hx509_err.c $(OBJ)\hx509_err.h: hx509_err.et
214 $(BINDIR)\compile_et.exe $(SRCDIR)\hx509_err.et
217 $(OBJ)\sel-gram.obj: $(OBJ)\sel-gram.c
220 $(OBJ)\sel-lex.obj: $(OBJ)\sel-lex.c
221 $(C2OBJ) -I$(SRCDIR) -I$(OBJ)
223 $(OBJ)\sel-gram.c: sel-gram.y
224 $(YACC) -o $@ --defines=$(OBJ)\sel-gram.h sel-gram.y
226 $(OBJ)\sel-lex.c: sel-lex.l
227 $(LEX) -o$@ sel-lex.l
229 all:: $(INCFILES) $(LIBHX509)
234 ! if !exist($(OBJ)\tool)
238 all-tools:: $(BINDIR)\hxtool.exe
241 -$(RM) $(BINDIR)\hxtool.exe
242 -$(RM) $(OBJ)\tool\*.*
244 {}.c{$(OBJ)\tool}.obj::
245 $(C2OBJ_C) /Fd$(OBJ)\tool\ /Fo$(OBJ)\tool\ /MP /UASN1_LIB $<
247 {$(OBJ)}.c{$(OBJ)\tool}.obj::
248 $(C2OBJ_C) /Fd$(OBJ)\tool\ /Fo$(OBJ)\tool\ /MP /UASN1_LIB $<