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.
36 AUXCFLAGS=$(AUXCFLAGS) -DKRB5 -I$(HCRYPTOINCLUDEDIR)
38 !include ../../windows/NTMakefile.w32
40 # Do dependencies first
50 HCRYPTOINCLUDEDIR=$(INCDIR)\hcrypto
53 $(HCRYPTOINCLUDEDIR)\aes.h \
54 $(HCRYPTOINCLUDEDIR)\bn.h \
55 $(HCRYPTOINCLUDEDIR)\des.h \
56 $(HCRYPTOINCLUDEDIR)\dh.h \
57 $(HCRYPTOINCLUDEDIR)\dsa.h \
58 $(HCRYPTOINCLUDEDIR)\ec.h \
59 $(HCRYPTOINCLUDEDIR)\ecdh.h \
60 $(HCRYPTOINCLUDEDIR)\ecdsa.h \
61 $(HCRYPTOINCLUDEDIR)\engine.h \
62 $(HCRYPTOINCLUDEDIR)\evp.h \
63 $(HCRYPTOINCLUDEDIR)\evp-hcrypto.h \
64 $(HCRYPTOINCLUDEDIR)\evp-cc.h \
65 $(HCRYPTOINCLUDEDIR)\hmac.h \
66 $(HCRYPTOINCLUDEDIR)\md2.h \
67 $(HCRYPTOINCLUDEDIR)\md4.h \
68 $(HCRYPTOINCLUDEDIR)\md5.h \
69 $(HCRYPTOINCLUDEDIR)\pkcs12.h \
70 $(HCRYPTOINCLUDEDIR)\rand.h \
71 $(HCRYPTOINCLUDEDIR)\randi.h \
72 $(HCRYPTOINCLUDEDIR)\rc2.h \
73 $(HCRYPTOINCLUDEDIR)\rc4.h \
74 $(HCRYPTOINCLUDEDIR)\rsa.h \
75 $(HCRYPTOINCLUDEDIR)\sha.h \
76 $(HCRYPTOINCLUDEDIR)\ui.h
79 !if !exist($(HCRYPTOINCLUDEDIR))
80 $(MKDIR) $(HCRYPTOINCLUDEDIR)
83 {}.h{$(HCRYPTOINCLUDEDIR)}.h:
98 $(OBJ)\camellia-ntt.obj \
101 $(OBJ)\dh-imath.obj \
105 $(OBJ)\evp-hcrypto.obj \
113 $(OBJ)\rand-w32.obj \
117 $(OBJ)\rijndael-alg-fst.obj \
118 $(OBJ)\rnd_keys.obj \
121 $(OBJ)\rsa-imath.obj \
127 $(LIBHCRYPTO): $(libhcrypto_OBJs)
130 {imath/}.c{$(OBJ)}.obj::
140 TESTLIB=$(OBJ)\libhctest.lib
150 $(OBJ)\example_evp_cipher.exe \
155 $(OBJ)\test_cipher.exe \
156 $(OBJ)\test_engine_dso.exe \
157 $(OBJ)\test_hmac.exe \
158 $(OBJ)\test_imath.exe \
159 $(OBJ)\test_pkcs5.exe \
160 $(OBJ)\test_pkcs12.exe \
161 $(OBJ)\test_rsa.exe \
163 $(OBJ)\test_rand.exe \
164 $(OBJ)\test_crypto.sh
166 $(OBJ)\destest.exe: $(OBJ)\destest.obj $(TESTLIB) $(LIBROKEN)
170 $(OBJ)\example_evp_cipher.exe: $(OBJ)\example_evp_cipher.obj $(TESTLIB) $(LIBHEIMDAL) $(LIBROKEN)
174 $(OBJ)\mdtest.exe: $(OBJ)\mdtest.obj $(LIBHEIMDAL) $(LIBROKEN)
178 $(OBJ)\rc2test.exe: $(OBJ)\rc2test.obj $(LIBHEIMDAL) $(LIBROKEN)
182 $(OBJ)\rctest.exe: $(OBJ)\rctest.obj $(LIBHEIMDAL) $(LIBROKEN)
186 $(OBJ)\test_bn.exe: $(OBJ)\test_bn.obj $(LIBHEIMDAL) $(LIBROKEN)
190 $(OBJ)\test_cipher.exe: $(OBJ)\test_cipher.obj $(TESTLIB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
194 $(OBJ)\test_engine_dso.exe: $(OBJ)\test_engine_dso.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
198 $(OBJ)\test_hmac.exe: $(OBJ)\test_hmac.obj $(LIBHEIMDAL)
202 $(OBJ)\test_imath.exe: $(OBJ)\test_imath.obj $(TESTLIB) $(LIBROKEN)
206 $(OBJ)\test_pkcs5.exe: $(OBJ)\test_pkcs5.obj $(LIBHEIMDAL) $(LIBROKEN)
210 $(OBJ)\test_pkcs12.exe: $(OBJ)\test_pkcs12.obj $(LIBHEIMDAL) $(LIBROKEN)
214 $(OBJ)\test_rsa.exe: $(OBJ)\test_rsa.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
218 $(OBJ)\test_dh.exe: $(OBJ)\test_dh.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
222 $(OBJ)\test_rand.exe: $(OBJ)\test_rand.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
226 SRCDIR1=$(SRCDIR:\=/)
227 SRCDIR2=$(SRCDIR1::=)
229 $(OBJ)\test_crypto.sh: test_crypto.in NTMakefile
230 $(SED) -e "s,[@]srcdir[@],/$(SRCDIR2),g" -e "s,[@]exeext[@],.exe,g" < test_crypto.in > $@ || $(RM) $@
252 test:: $(TESTLIB) test-binaries test-run
255 $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libhcrypto-exports.def