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_LTM=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)\evp-wincng.h \
66 $(HCRYPTOINCLUDEDIR)\evp-w32.h \
67 $(HCRYPTOINCLUDEDIR)\hmac.h \
68 $(HCRYPTOINCLUDEDIR)\md2.h \
69 $(HCRYPTOINCLUDEDIR)\md4.h \
70 $(HCRYPTOINCLUDEDIR)\md5.h \
71 $(HCRYPTOINCLUDEDIR)\pkcs12.h \
72 $(HCRYPTOINCLUDEDIR)\rand.h \
73 $(HCRYPTOINCLUDEDIR)\randi.h \
74 $(HCRYPTOINCLUDEDIR)\rc2.h \
75 $(HCRYPTOINCLUDEDIR)\rc4.h \
76 $(HCRYPTOINCLUDEDIR)\rsa.h \
77 $(HCRYPTOINCLUDEDIR)\sha.h \
78 $(HCRYPTOINCLUDEDIR)\ui.h
81 !if !exist($(HCRYPTOINCLUDEDIR))
82 $(MKDIR) $(HCRYPTOINCLUDEDIR)
85 {}.h{$(HCRYPTOINCLUDEDIR)}.h:
98 $(OBJ)\camellia-ntt.obj \
106 $(OBJ)\evp-hcrypto.obj \
108 $(OBJ)\evp-wincng.obj \
117 $(OBJ)\rand-w32.obj \
121 $(OBJ)\rijndael-alg-fst.obj \
122 $(OBJ)\rnd_keys.obj \
133 $(LIBHCRYPTO): $(libhcrypto_OBJs)
143 TESTLIB=$(OBJ)\libhctest.lib
152 $(OBJ)\example_evp_cipher.exe \
157 $(OBJ)\test_bulk.exe \
158 $(OBJ)\test_cipher.exe \
159 $(OBJ)\test_engine_dso.exe \
160 $(OBJ)\test_hmac.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) $(OBJ)\sha512.obj
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_bulk.exe: $(OBJ)\test_bulk.obj $(TESTLIB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
196 $(OBJ)\test_cipher.exe: $(OBJ)\test_cipher.obj $(TESTLIB) $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
200 $(OBJ)\test_engine_dso.exe: $(OBJ)\test_engine_dso.obj $(LIBHEIMDAL) $(LIBROKEN) $(LIBVERS)
204 $(OBJ)\test_hmac.exe: $(OBJ)\test_hmac.obj $(LIBHEIMDAL) $(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 SRCDIR2=$(SRCDIR:\=\\\\)
230 $(OBJ)\test_crypto.sh: test_crypto.in NTMakefile
231 $(SED) -e "s,[@]srcdir[@],$(SRCDIR2),g" -e "s,[@]exeext[@],.exe,g" -e "s,\r,," < test_crypto.in > $@ || $(RM) $@
253 test:: $(TESTLIB) test-binaries test-run
256 $(PERL) ..\..\cf\w32-check-exported-symbols.pl --vs version-script.map --def libhcrypto-exports.def