speed for rsa
[heimdal.git] / lib / hx509 / NTMakefile
blob0a36acc501e2bfa84f848dd970670ba0748f982b
1 ########################################################################
3 # Copyright (c) 2009, Secure Endpoints Inc.
4 # All rights reserved.
5
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
9
10 # - Redistributions of source code must retain the above copyright
11 #   notice, this list of conditions and the following disclaimer.
12
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
16 #   distribution.
17
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.
30
32 RELDIR=lib\hx509
34 !include ../../windows/NTMakefile.w32
36 gen_files_ocsp =                        \
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
56 gen_files_pkcs10 =                      \
57         $(OBJ)\asn1_CertificationRequestInfo.x  \
58         $(OBJ)\asn1_CertificationRequest.x
60 gen_files_crmf =                        \
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 
75 libhx509_la_OBJS = \
76         $(OBJ)\ca.obj \
77         $(OBJ)\cert.obj \
78         $(OBJ)\cms.obj \
79         $(OBJ)\collector.obj \
80         $(OBJ)\crypto.obj \
81         $(OBJ)\error.obj \
82         $(OBJ)\env.obj \
83         $(OBJ)\file.obj \
84         $(OBJ)\hx509_err.obj    \
85         $(OBJ)\sel.obj \
86         $(OBJ)\sel-gram.obj     \
87         $(OBJ)\sel-lex.obj      \
88         $(OBJ)\keyset.obj \
89         $(OBJ)\ks_dir.obj \
90         $(OBJ)\ks_file.obj \
91         $(OBJ)\ks_mem.obj \
92         $(OBJ)\ks_null.obj \
93         $(OBJ)\ks_p11.obj \
94         $(OBJ)\ks_p12.obj \
95         $(OBJ)\ks_keychain.obj \
96         $(OBJ)\lock.obj \
97         $(OBJ)\name.obj \
98         $(OBJ)\peer.obj \
99         $(OBJ)\print.obj \
100         $(OBJ)\softp11.obj \
101         $(OBJ)\req.obj \
102         $(OBJ)\revoke.obj       \
103         $(gen_files_ocsp:.x=.obj)       \
104         $(gen_files_pkcs10:.x=.obj)
106 !ifndef STATICLIBS
108 $(LIBHX509): $(BINDIR)\libhx509.dll
110 $(BINDIR)\libhx509.dll: $(libhx509_la_OBJS) $(LIBHCRYPTO) $(LIBASN1) $(LIBWIND) $(LIBROKEN) $(LIBCOMERR)
111         $(DLLGUILINK) -def:libhx509-exports.def -implib:$(LIBHX509) shell32.lib
112         $(DLLPREP)
114 !else
116 $(LIBHX509): $(libhx509_la_OBJS)
117         $(LIBCON)
119 !endif
121 dist_libhx509_la_SOURCES = \
122         $(SRCDIR)\ca.c \
123         $(SRCDIR)\cert.c \
124         $(SRCDIR)\cms.c \
125         $(SRCDIR)\collector.c \
126         $(SRCDIR)\crypto.c \
127         $(SRCDIR)\doxygen.c \
128         $(SRCDIR)\error.c \
129         $(SRCDIR)\env.c \
130         $(SRCDIR)\file.c \
131         $(SRCDIR)\hx509.h \
132         $(SRCDIR)\hx_locl.h \
133         $(SRCDIR)\sel.c \
134         $(SRCDIR)\sel.h \
135         $(SRCDIR)\sel-gram.y \
136         $(SRCDIR)\sel-lex.l \
137         $(SRCDIR)\keyset.c \
138         $(SRCDIR)\ks_dir.c \
139         $(SRCDIR)\ks_file.c \
140         $(SRCDIR)\ks_mem.c \
141         $(SRCDIR)\ks_null.c \
142         $(SRCDIR)\ks_p11.c \
143         $(SRCDIR)\ks_p12.c \
144         $(SRCDIR)\ks_keychain.c \
145         $(SRCDIR)\lock.c \
146         $(SRCDIR)\name.c \
147         $(SRCDIR)\peer.c \
148         $(SRCDIR)\print.c \
149         $(SRCDIR)\softp11.c \
150         $(SRCDIR)\ref\pkcs11.h \
151         $(SRCDIR)\req.c \
152         $(SRCDIR)\revoke.c
154 AUXCFLAGS=$(AUXCFLAGS) -I$(SRCDIR)\ref -I$(OBJ)
156 asn1_compile=$(BINDIR)\asn1_compile.exe
158 $(gen_files_ocsp:.x=.c): $$(@R).x
160 $(gen_files_pkcs10:.x=.c): $$(@R).x
162 $(gen_files_crmf:.x=.c): $$(@R).x
164 $(gen_files_ocsp) $(OBJ)\ocsp_asn1.hx: $(asn1_compile) ocsp.asn1
165         cd $(OBJ)
166         $(asn1_compile) \
167                 --preserve-binary=OCSPTBSRequest \
168                 --preserve-binary=OCSPResponseData \
169                 $(SRCDIR)\ocsp.asn1 ocsp_asn1 \
170         || ( $(RM) -f $(gen_files_ocsp) $(OBJ)\ocsp_asn1.h ; exit /b 1 )
171         cd $(SRCDIR)
173 $(gen_files_pkcs10) $(OBJ)\pkcs10_asn1.hx: $(asn1_compile) pkcs10.asn1
174         cd $(OBJ)
175         $(asn1_compile) \
176                 --preserve-binary=CertificationRequestInfo \
177                 $(SRCDIR)\pkcs10.asn1 pkcs10_asn1 \
178         || ( $(RM) -f $(gen_files_pkcs10) $(OBJ)\pkcs10_asn1.h ; exit /b 1 )
179         cd $(SRCDIR)
181 $(gen_files_crmf) $(OBJ)\crmf_asn1.hx: $(asn1_compile) crmf.asn1
182         cd $(OBJ)
183         $(asn1_compile) $(SRCDIR)\crmf.asn1 crmf_asn1 \
184         || ( $(RM) -f $(gen_files_crmf) $(OBJ)\crmf_asn1.h ; exit /b 1 )
185         cd $(SRCDIR)
187 INCFILES=                           \
188         $(INCDIR)\hx509.h           \
189         $(INCDIR)\hx509-protos.h    \
190         $(INCDIR)\hx509-private.h   \
191         $(INCDIR)\hx509_err.h       \
192         $(INCDIR)\ocsp_asn1.h       \
193         $(INCDIR)\pkcs10_asn1.h     \
194         $(INCDIR)\crmf_asn1.h       \
195         $(OBJ)\ocsp_asn1-priv.h     \
196         $(OBJ)\pkcs10_asn1-priv.h   \
197         $(OBJ)\crmf_asn1-priv.h
199 hxtool.c: $(OBJ)\hxtool-commands.h
201 SLC=$(BINDIR)\slc.exe
203 $(OBJ)\hxtool-commands.c $(OBJ)\hxtool-commands.h: hxtool-commands.in $(SLC)
204         cd $(OBJ)
205         $(CP) $(SRCDIR)\hxtool-commands.in $(OBJ)\hxtool-commands.in
206         $(SLC) hxtool-commands.in
207         cd $(SRCDIR)
209 $(BINDIR)\hxtool.exe: $(OBJ)\hxtool.obj $(OBJ)\hxtool-commands.obj $(LIBHX509)
210         $(EXECONLINK) $(LIBASN1) $(LIBHCRYPTO) $(LIBROKEN) $(LIBSL) $(LIBVERS) $(LIBWIND) $(LIBCOMERR)
211         $(_VC_MANIFEST_EMBED_EXE)
212         $(_VC_MANIFEST_CLEAN)
213         $(_CODESIGN)
215 $(OBJ)\hx509-protos.h:
216         cd $(OBJ)
217         $(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
218         cd $(SRCDIR)
220 $(OBJ)\hx509-private.h:
221         cd $(OBJ)
222         $(PERL) $(SRCDIR)\..\..\cf\make-proto.pl -q -P remove -p hx509-private.h $(dist_libhx509_la_SOURCES) || $(RM) -f hx509-private.h
223         cd $(SRCDIR)
225 $(OBJ)\hx509_err.c $(OBJ)\hx509_err.h: hx509_err.et
226         cd $(OBJ)
227         $(BINDIR)\compile_et.exe $(SRCDIR)\hx509_err.et
228         cd $(SRCDIR)
230 $(OBJ)\sel-gram.obj: $(OBJ)\sel-gram.c
231         $(C2OBJ) -I$(SRCDIR)
233 $(OBJ)\sel-lex.obj: $(OBJ)\sel-lex.c
234         $(C2OBJ) -I$(SRCDIR) -I$(OBJ)
236 $(OBJ)\sel-gram.c: sel-gram.y
237         $(YACC) -o $@ --defines=$(OBJ)\sel-gram.h sel-gram.y
239 $(OBJ)\sel-lex.c: sel-lex.l
240         $(LEX) -o$@ sel-lex.l
242 all:: $(INCFILES) $(LIBHX509) $(BINDIR)\hxtool.exe
244 clean::
245         -$(RM) $(BINDIR)\hxtool.exe