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.
34 !include ../../windows/NTMakefile.w32
37 $(OBJ)\asn1_OCSPBasicOCSPResponse.x \
38 $(OBJ)\asn1_OCSPCertID.x \
39 $(OBJ)\asn1_OCSPCertStatus.x \
40 $(OBJ)\asn1_OCSPInnerRequest.x \
41 $(OBJ)\asn1_OCSPKeyHash.x \
42 $(OBJ)\asn1_OCSPRequest.x \
43 $(OBJ)\asn1_OCSPResponderID.x \
44 $(OBJ)\asn1_OCSPResponse.x \
45 $(OBJ)\asn1_OCSPResponseBytes.x \
46 $(OBJ)\asn1_OCSPResponseData.x \
47 $(OBJ)\asn1_OCSPResponseStatus.x \
48 $(OBJ)\asn1_OCSPSignature.x \
49 $(OBJ)\asn1_OCSPSingleResponse.x \
50 $(OBJ)\asn1_OCSPTBSRequest.x \
51 $(OBJ)\asn1_OCSPVersion.x \
52 $(OBJ)\asn1_id_pkix_ocsp.x \
53 $(OBJ)\asn1_id_pkix_ocsp_basic.x \
54 $(OBJ)\asn1_id_pkix_ocsp_nonce.x
57 $(OBJ)\asn1_CertificationRequestInfo.x \
58 $(OBJ)\asn1_CertificationRequest.x
61 $(OBJ)\asn1_CRMFRDNSequence.x \
62 $(OBJ)\asn1_CertReqMessages.x \
63 $(OBJ)\asn1_CertReqMsg.x \
64 $(OBJ)\asn1_CertRequest.x \
65 $(OBJ)\asn1_CertTemplate.x \
66 $(OBJ)\asn1_Controls.x \
67 $(OBJ)\asn1_PBMParameter.x \
68 $(OBJ)\asn1_PKMACValue.x \
69 $(OBJ)\asn1_POPOPrivKey.x \
70 $(OBJ)\asn1_POPOSigningKey.x \
71 $(OBJ)\asn1_POPOSigningKeyInput.x \
72 $(OBJ)\asn1_ProofOfPossession.x \
73 $(OBJ)\asn1_SubsequentMessage.x
79 $(OBJ)\collector.obj \
84 $(OBJ)\hx509_err.obj \
95 $(OBJ)\ks_keychain.obj \
103 $(gen_files_ocsp:.x=.obj) \
104 $(gen_files_pkcs10:.x=.obj)
106 $(LIBHX509): $(libhx509_la_OBJS)
109 dist_libhx509_la_SOURCES = \
113 $(SRCDIR)\collector.c \
115 $(SRCDIR)\doxygen.c \
120 $(SRCDIR)\hx_locl.h \
123 $(SRCDIR)\sel-gram.y \
124 $(SRCDIR)\sel-lex.l \
127 $(SRCDIR)\ks_file.c \
129 $(SRCDIR)\ks_null.c \
132 $(SRCDIR)\ks_keychain.c \
137 $(SRCDIR)\softp11.c \
138 $(SRCDIR)\ref\pkcs11.h \
142 AUXCFLAGS=$(AUXCFLAGS) -I$(SRCDIR)\ref -I$(OBJ)
144 asn1_compile=$(BINDIR)\asn1_compile.exe
146 $(gen_files_ocsp:.x=.c): $$(@R).x
148 $(gen_files_pkcs10:.x=.c): $$(@R).x
150 $(gen_files_crmf:.x=.c): $$(@R).x
152 $(gen_files_ocsp) $(OBJ)\ocsp_asn1.hx: $(asn1_compile) ocsp.asn1
155 --preserve-binary=OCSPTBSRequest \
156 --preserve-binary=OCSPResponseData \
157 $(SRCDIR)\ocsp.asn1 ocsp_asn1 \
158 || ( $(RM) -f $(gen_files_ocsp) $(OBJ)\ocsp_asn1.h ; exit /b 1 )
161 $(gen_files_pkcs10) $(OBJ)\pkcs10_asn1.hx: $(asn1_compile) pkcs10.asn1
164 --preserve-binary=CertificationRequestInfo \
165 $(SRCDIR)\pkcs10.asn1 pkcs10_asn1 \
166 || ( $(RM) -f $(gen_files_pkcs10) $(OBJ)\pkcs10_asn1.h ; exit /b 1 )
169 $(gen_files_crmf) $(OBJ)\crmf_asn1.hx: $(asn1_compile) crmf.asn1
171 $(asn1_compile) $(SRCDIR)\crmf.asn1 crmf_asn1 \
172 || ( $(RM) -f $(gen_files_crmf) $(OBJ)\crmf_asn1.h ; exit /b 1 )
177 $(INCDIR)\hx509-protos.h \
178 $(INCDIR)\hx509-private.h \
179 $(INCDIR)\hx509_err.h \
180 $(INCDIR)\ocsp_asn1.h \
181 $(INCDIR)\pkcs10_asn1.h \
182 $(INCDIR)\crmf_asn1.h \
183 $(OBJ)\ocsp_asn1-priv.h \
184 $(OBJ)\pkcs10_asn1-priv.h \
185 $(OBJ)\crmf_asn1-priv.h
187 hxtool.c: $(OBJ)\hxtool-commands.h
189 SLC=$(BINDIR)\slc.exe
191 $(OBJ)\hxtool-commands.c $(OBJ)\hxtool-commands.h: hxtool-commands.in $(SLC)
193 $(CP) $(SRCDIR)\hxtool-commands.in $(OBJ)\hxtool-commands.in
194 $(SLC) hxtool-commands.in
197 $(BINDIR)\hxtool.exe: $(OBJ)\hxtool.obj $(OBJ)\hxtool-commands.obj $(LIBHEIMDAL)
198 $(EXECONLINK) $(LIBHEIMDAL) $(LIBROKEN) $(LIBSL) $(LIBVERS) $(LIBCOMERR)
201 $(OBJ)\hx509-protos.h:
203 $(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
206 $(OBJ)\hx509-private.h:
208 $(PERL) $(SRCDIR)\..\..\cf\make-proto.pl -q -P remove -p hx509-private.h $(dist_libhx509_la_SOURCES) || $(RM) -f hx509-private.h
211 $(OBJ)\hx509_err.c $(OBJ)\hx509_err.h: hx509_err.et
213 $(BINDIR)\compile_et.exe $(SRCDIR)\hx509_err.et
216 $(OBJ)\sel-gram.obj: $(OBJ)\sel-gram.c
219 $(OBJ)\sel-lex.obj: $(OBJ)\sel-lex.c
220 $(C2OBJ) -I$(SRCDIR) -I$(OBJ)
222 $(OBJ)\sel-gram.c: sel-gram.y
223 $(YACC) -o $@ --defines=$(OBJ)\sel-gram.h sel-gram.y
225 $(OBJ)\sel-lex.c: sel-lex.l
226 $(LEX) -o$@ sel-lex.l
228 all:: $(INCFILES) $(LIBHX509)
230 all-tools:: $(BINDIR)\hxtool.exe
233 -$(RM) $(BINDIR)\hxtool.exe