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 intcflags=-DKRB5 -DASN1_LIB -I$(HCRYPTOINCLUDEDIR) -DUSE_HCRYPTO_IMATH=1
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 \
102 $(OBJ)\dh-imath.obj \
106 $(OBJ)\evp-hcrypto.obj \
114 $(OBJ)\rand-w32.obj \
118 $(OBJ)\rijndael-alg-fst.obj \
119 $(OBJ)\rnd_keys.obj \
122 $(OBJ)\rsa-imath.obj \
129 $(LIBHCRYPTO): $(libhcrypto_OBJs)
132 {imath/}.c{$(OBJ)}.obj::
142 TESTLIB=$(OBJ)\libhctest.lib
152 $(OBJ)\example_evp_cipher.exe \
157 $(OBJ)\test_cipher.exe \
158 $(OBJ)\test_engine_dso.exe \
159 $(OBJ)\test_hmac.exe \
160 $(OBJ)\test_imath.exe \
161 $(OBJ)\test_pkcs5.exe \
162 $(OBJ)\test_pkcs12.exe \
163 $(OBJ)\test_rsa.exe \
165 $(OBJ)\test_rand.exe \
166 $(OBJ)\test_crypto.sh
168 $(OBJ)\destest.exe: $(OBJ)\destest.obj $(TESTLIB) $(LIBROKEN)
172 $(OBJ)\example_evp_cipher.exe: $(OBJ)\example_evp_cipher.obj $(TESTLIB) $(LIBHEIMDAL) $(LIBROKEN)
176 $(OBJ)\mdtest.exe: $(OBJ)\mdtest.obj $(LIBHEIMDAL) $(LIBROKEN)
180 $(OBJ)\rc2test.exe: $(OBJ)\rc2test.obj $(LIBHEIMDAL) $(LIBROKEN)
184 $(OBJ)\rctest.exe: $(OBJ)\rctest.obj $(LIBHEIMDAL) $(LIBROKEN)
188 $(OBJ)\test_bn.exe: $(OBJ)\test_bn.obj $(LIBHEIMDAL) $(LIBROKEN)
192 $(OBJ)\test_cipher.exe: $(OBJ)\test_cipher.obj $(TESTLIB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
196 $(OBJ)\test_engine_dso.exe: $(OBJ)\test_engine_dso.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
200 $(OBJ)\test_hmac.exe: $(OBJ)\test_hmac.obj $(LIBHEIMDAL) $(LIBROKEN)
204 $(OBJ)\test_imath.exe: $(OBJ)\test_imath.obj $(TESTLIB) $(LIBROKEN)
208 $(OBJ)\test_pkcs5.exe: $(OBJ)\test_pkcs5.obj $(LIBHEIMDAL) $(LIBROKEN)
212 $(OBJ)\test_pkcs12.exe: $(OBJ)\test_pkcs12.obj $(LIBHEIMDAL) $(LIBROKEN)
216 $(OBJ)\test_rsa.exe: $(OBJ)\test_rsa.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
220 $(OBJ)\test_dh.exe: $(OBJ)\test_dh.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
224 $(OBJ)\test_rand.exe: $(OBJ)\test_rand.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
228 SRCDIR1=$(SRCDIR:\=/)
229 SRCDIR2=$(SRCDIR1::=)
231 $(OBJ)\test_crypto.sh: test_crypto.in NTMakefile
232 $(SED) -e "s,[@]srcdir[@],/$(SRCDIR2),g" -e "s,[@]exeext[@],.exe,g" < test_crypto.in > $@ || $(RM) $@
254 test:: $(TESTLIB) test-binaries test-run
257 $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libhcrypto-exports.def