comparison makefile.msvc @ 191:1c15b283127b libtomcrypt-orig

Import of libtomcrypt 1.02 with manual path rename rearrangement etc
author Matt Johnston <matt@ucc.asn.au>
date Fri, 06 May 2005 13:23:02 +0000
parents 5d99163f7e32
children 9cc34777b479 39d5d58461d6
comparison
equal deleted inserted replaced
143:5d99163f7e32 191:1c15b283127b
1 #MSVC Makefile [tested with MSVC 6.00 with SP5] 1 #MSVC Makefile [tested with MSVC 6.00 with SP5]
2 # 2 #
3 #Tom St Denis 3 #Tom St Denis
4 CFLAGS = /I. /Ox /DWIN32 /W3 4 CFLAGS = /Isrc/headers/ /Itestprof/ /Ox /DWIN32 /W3 /Fo$@
5 5
6 default: library 6 default: library
7 7
8 # leave this blank and link against libtommath if you want better link resolution 8 # leave this blank and link against libtommath if you want better link resolution
9 MPIOBJECT=mpi.obj 9 MPIOBJECT=src/misc/mpi/mpi.obj
10 10
11 OBJECTS=error_to_string.obj mpi_to_ltc_error.obj base64_encode.obj base64_decode.obj \ 11 OBJECTS=src/ciphers/aes/aes_enc.obj $(MPIOBJECT) src/ciphers/aes/aes.obj src/ciphers/anubis.obj \
12 \ 12 src/ciphers/blowfish.obj src/ciphers/cast5.obj src/ciphers/des.obj src/ciphers/khazad.obj src/ciphers/noekeon.obj \
13 crypt.obj crypt_find_cipher.obj crypt_find_hash_any.obj \ 13 src/ciphers/rc2.obj src/ciphers/rc5.obj src/ciphers/rc6.obj src/ciphers/safer/safer.obj \
14 crypt_hash_is_valid.obj crypt_register_hash.obj crypt_unregister_prng.obj \ 14 src/ciphers/safer/safer_tab.obj src/ciphers/safer/saferp.obj src/ciphers/skipjack.obj \
15 crypt_argchk.obj crypt_find_cipher_any.obj crypt_find_hash_id.obj \ 15 src/ciphers/twofish/twofish.obj src/ciphers/xtea.obj src/encauth/ccm/ccm_memory.obj \
16 crypt_prng_descriptor.obj crypt_register_prng.obj crypt_cipher_descriptor.obj \ 16 src/encauth/ccm/ccm_test.obj src/encauth/eax/eax_addheader.obj src/encauth/eax/eax_decrypt.obj \
17 crypt_find_cipher_id.obj crypt_find_prng.obj crypt_prng_is_valid.obj \ 17 src/encauth/eax/eax_decrypt_verify_memory.obj src/encauth/eax/eax_done.obj src/encauth/eax/eax_encrypt.obj \
18 crypt_unregister_cipher.obj crypt_cipher_is_valid.obj crypt_find_hash.obj \ 18 src/encauth/eax/eax_encrypt_authenticate_memory.obj src/encauth/eax/eax_init.obj \
19 crypt_hash_descriptor.obj crypt_register_cipher.obj crypt_unregister_hash.obj \ 19 src/encauth/eax/eax_test.obj src/encauth/gcm/gcm_add_aad.obj src/encauth/gcm/gcm_add_iv.obj \
20 \ 20 src/encauth/gcm/gcm_done.obj src/encauth/gcm/gcm_gf_mult.obj src/encauth/gcm/gcm_init.obj \
21 sober128.obj fortuna.obj sprng.obj yarrow.obj rc4.obj rng_get_bytes.obj rng_make_prng.obj \ 21 src/encauth/gcm/gcm_memory.obj src/encauth/gcm/gcm_process.obj src/encauth/gcm/gcm_reset.obj \
22 \ 22 src/encauth/gcm/gcm_test.obj src/encauth/ocb/ocb_decrypt.obj src/encauth/ocb/ocb_decrypt_verify_memory.obj \
23 rand_prime.obj is_prime.obj \ 23 src/encauth/ocb/ocb_done_decrypt.obj src/encauth/ocb/ocb_done_encrypt.obj src/encauth/ocb/ocb_encrypt.obj \
24 \ 24 src/encauth/ocb/ocb_encrypt_authenticate_memory.obj src/encauth/ocb/ocb_init.obj src/encauth/ocb/ocb_ntz.obj \
25 ecc.obj dh.obj \ 25 src/encauth/ocb/ocb_shift_xor.obj src/encauth/ocb/ocb_test.obj src/encauth/ocb/s_ocb_done.obj \
26 \ 26 src/hashes/chc/chc.obj src/hashes/helper/hash_file.obj src/hashes/helper/hash_filehandle.obj \
27 rsa_decrypt_key.obj rsa_encrypt_key.obj rsa_exptmod.obj rsa_free.obj rsa_make_key.obj \ 27 src/hashes/helper/hash_memory.obj src/hashes/helper/hash_memory_multi.obj src/hashes/md2.obj src/hashes/md4.obj \
28 rsa_sign_hash.obj rsa_verify_hash.obj rsa_export.obj rsa_import.obj tim_exptmod.obj \ 28 src/hashes/md5.obj src/hashes/rmd128.obj src/hashes/rmd160.obj src/hashes/sha1.obj src/hashes/sha2/sha256.obj \
29 rsa_v15_encrypt_key.obj rsa_v15_decrypt_key.obj rsa_v15_sign_hash.obj rsa_v15_verify_hash.obj \ 29 src/hashes/sha2/sha512.obj src/hashes/tiger.obj src/hashes/whirl/whirl.obj src/mac/hmac/hmac_done.obj \
30 \ 30 src/mac/hmac/hmac_file.obj src/mac/hmac/hmac_init.obj src/mac/hmac/hmac_memory.obj \
31 dsa_export.obj dsa_free.obj dsa_import.obj dsa_make_key.obj dsa_sign_hash.obj \ 31 src/mac/hmac/hmac_memory_multi.obj src/mac/hmac/hmac_process.obj src/mac/hmac/hmac_test.obj \
32 dsa_verify_hash.obj dsa_verify_key.obj \ 32 src/mac/omac/omac_done.obj src/mac/omac/omac_file.obj src/mac/omac/omac_init.obj src/mac/omac/omac_memory.obj \
33 \ 33 src/mac/omac/omac_memory_multi.obj src/mac/omac/omac_process.obj src/mac/omac/omac_test.obj \
34 aes.obj aes_enc.obj \ 34 src/mac/pelican/pelican.obj src/mac/pelican/pelican_memory.obj src/mac/pelican/pelican_test.obj \
35 \ 35 src/mac/pmac/pmac_done.obj src/mac/pmac/pmac_file.obj src/mac/pmac/pmac_init.obj src/mac/pmac/pmac_memory.obj \
36 blowfish.obj des.obj safer_tab.obj safer.obj saferp.obj rc2.obj xtea.obj \ 36 src/mac/pmac/pmac_memory_multi.obj src/mac/pmac/pmac_ntz.obj src/mac/pmac/pmac_process.obj \
37 rc6.obj rc5.obj cast5.obj noekeon.obj twofish.obj skipjack.obj \ 37 src/mac/pmac/pmac_shift_xor.obj src/mac/pmac/pmac_test.obj src/misc/base64/base64_decode.obj \
38 \ 38 src/misc/base64/base64_encode.obj src/misc/burn_stack.obj src/misc/crypt/crypt.obj \
39 md2.obj md4.obj md5.obj sha1.obj sha256.obj sha512.obj tiger.obj whirl.obj \ 39 src/misc/crypt/crypt_argchk.obj src/misc/crypt/crypt_cipher_descriptor.obj \
40 rmd128.obj rmd160.obj chc.obj \ 40 src/misc/crypt/crypt_cipher_is_valid.obj src/misc/crypt/crypt_find_cipher.obj \
41 \ 41 src/misc/crypt/crypt_find_cipher_any.obj src/misc/crypt/crypt_find_cipher_id.obj \
42 packet_store_header.obj packet_valid_header.obj \ 42 src/misc/crypt/crypt_find_hash.obj src/misc/crypt/crypt_find_hash_any.obj \
43 \ 43 src/misc/crypt/crypt_find_hash_id.obj src/misc/crypt/crypt_find_prng.obj \
44 eax_addheader.obj eax_decrypt.obj eax_decrypt_verify_memory.obj eax_done.obj eax_encrypt.obj \ 44 src/misc/crypt/crypt_hash_descriptor.obj src/misc/crypt/crypt_hash_is_valid.obj \
45 eax_encrypt_authenticate_memory.obj eax_init.obj eax_test.obj \ 45 src/misc/crypt/crypt_prng_descriptor.obj src/misc/crypt/crypt_prng_is_valid.obj \
46 \ 46 src/misc/crypt/crypt_register_cipher.obj src/misc/crypt/crypt_register_hash.obj \
47 ocb_decrypt.obj ocb_decrypt_verify_memory.obj ocb_done_decrypt.obj ocb_done_encrypt.obj \ 47 src/misc/crypt/crypt_register_prng.obj src/misc/crypt/crypt_unregister_cipher.obj \
48 ocb_encrypt.obj ocb_encrypt_authenticate_memory.obj ocb_init.obj ocb_ntz.obj \ 48 src/misc/crypt/crypt_unregister_hash.obj src/misc/crypt/crypt_unregister_prng.obj \
49 ocb_shift_xor.obj ocb_test.obj s_ocb_done.obj \ 49 src/misc/error_to_string.obj src/misc/mpi/is_prime.obj src/misc/mpi/mpi_to_ltc_error.obj \
50 \ 50 src/misc/mpi/rand_prime.obj src/misc/pkcs5/pkcs_5_1.obj src/misc/pkcs5/pkcs_5_2.obj src/misc/zeromem.obj \
51 omac_done.obj omac_file.obj omac_init.obj omac_memory.obj omac_process.obj omac_test.obj \ 51 src/modes/cbc/cbc_decrypt.obj src/modes/cbc/cbc_done.obj src/modes/cbc/cbc_encrypt.obj \
52 \ 52 src/modes/cbc/cbc_getiv.obj src/modes/cbc/cbc_setiv.obj src/modes/cbc/cbc_start.obj \
53 pmac_done.obj pmac_file.obj pmac_init.obj pmac_memory.obj pmac_ntz.obj pmac_process.obj \ 53 src/modes/cfb/cfb_decrypt.obj src/modes/cfb/cfb_done.obj src/modes/cfb/cfb_encrypt.obj \
54 pmac_shift_xor.obj pmac_test.obj \ 54 src/modes/cfb/cfb_getiv.obj src/modes/cfb/cfb_setiv.obj src/modes/cfb/cfb_start.obj \
55 \ 55 src/modes/ctr/ctr_decrypt.obj src/modes/ctr/ctr_done.obj src/modes/ctr/ctr_encrypt.obj \
56 cbc_start.obj cbc_encrypt.obj cbc_decrypt.obj cbc_getiv.obj cbc_setiv.obj \ 56 src/modes/ctr/ctr_getiv.obj src/modes/ctr/ctr_setiv.obj src/modes/ctr/ctr_start.obj \
57 cfb_start.obj cfb_encrypt.obj cfb_decrypt.obj cfb_getiv.obj cfb_setiv.obj \ 57 src/modes/ecb/ecb_decrypt.obj src/modes/ecb/ecb_done.obj src/modes/ecb/ecb_encrypt.obj \
58 ofb_start.obj ofb_encrypt.obj ofb_decrypt.obj ofb_getiv.obj ofb_setiv.obj \ 58 src/modes/ecb/ecb_start.obj src/modes/ofb/ofb_decrypt.obj src/modes/ofb/ofb_done.obj \
59 ctr_start.obj ctr_encrypt.obj ctr_decrypt.obj ctr_getiv.obj ctr_setiv.obj \ 59 src/modes/ofb/ofb_encrypt.obj src/modes/ofb/ofb_getiv.obj src/modes/ofb/ofb_setiv.obj \
60 ecb_start.obj ecb_encrypt.obj ecb_decrypt.obj \ 60 src/modes/ofb/ofb_start.obj src/pk/asn1/der/der_decode_integer.obj src/pk/asn1/der/der_encode_integer.obj \
61 \ 61 src/pk/asn1/der/der_get_multi_integer.obj src/pk/asn1/der/der_length_integer.obj \
62 hash_file.obj hash_filehandle.obj hash_memory.obj \ 62 src/pk/asn1/der/der_put_multi_integer.obj src/pk/dh/dh.obj src/pk/dsa/dsa_export.obj src/pk/dsa/dsa_free.obj \
63 \ 63 src/pk/dsa/dsa_import.obj src/pk/dsa/dsa_make_key.obj src/pk/dsa/dsa_sign_hash.obj \
64 hmac_done.obj hmac_file.obj hmac_init.obj hmac_memory.obj hmac_process.obj hmac_test.obj \ 64 src/pk/dsa/dsa_verify_hash.obj src/pk/dsa/dsa_verify_key.obj src/pk/ecc/ecc.obj src/pk/packet_store_header.obj \
65 \ 65 src/pk/packet_valid_header.obj src/pk/pkcs1/pkcs_1_i2osp.obj src/pk/pkcs1/pkcs_1_mgf1.obj \
66 pkcs_1_mgf1.obj pkcs_1_oaep_encode.obj pkcs_1_oaep_decode.obj \ 66 src/pk/pkcs1/pkcs_1_oaep_decode.obj src/pk/pkcs1/pkcs_1_oaep_encode.obj src/pk/pkcs1/pkcs_1_os2ip.obj \
67 pkcs_1_pss_encode.obj pkcs_1_pss_decode.obj pkcs_1_i2osp.obj pkcs_1_os2ip.obj \ 67 src/pk/pkcs1/pkcs_1_pss_decode.obj src/pk/pkcs1/pkcs_1_pss_encode.obj src/pk/pkcs1/pkcs_1_v15_es_decode.obj \
68 pkcs_1_v15_es_encode.obj pkcs_1_v15_es_decode.obj pkcs_1_v15_sa_encode.obj pkcs_1_v15_sa_decode.obj \ 68 src/pk/pkcs1/pkcs_1_v15_es_encode.obj src/pk/pkcs1/pkcs_1_v15_sa_decode.obj \
69 \ 69 src/pk/pkcs1/pkcs_1_v15_sa_encode.obj src/pk/rsa/rsa_decrypt_key.obj src/pk/rsa/rsa_encrypt_key.obj \
70 pkcs_5_1.obj pkcs_5_2.obj \ 70 src/pk/rsa/rsa_export.obj src/pk/rsa/rsa_exptmod.obj src/pk/rsa/rsa_free.obj src/pk/rsa/rsa_import.obj \
71 \ 71 src/pk/rsa/rsa_make_key.obj src/pk/rsa/rsa_sign_hash.obj src/pk/rsa/rsa_v15_decrypt_key.obj \
72 der_encode_integer.obj der_decode_integer.obj der_length_integer.obj \ 72 src/pk/rsa/rsa_v15_encrypt_key.obj src/pk/rsa/rsa_v15_sign_hash.obj src/pk/rsa/rsa_v15_verify_hash.obj \
73 der_put_multi_integer.obj der_get_multi_integer.obj \ 73 src/pk/rsa/rsa_verify_hash.obj src/prngs/fortuna.obj src/prngs/rc4.obj src/prngs/rng_get_bytes.obj \
74 \ 74 src/prngs/rng_make_prng.obj src/prngs/sober128.obj src/prngs/sprng.obj src/prngs/yarrow.obj
75 burn_stack.obj zeromem.obj \
76 \
77 $(MPIOBJECT)
78 75
79 #ciphers come in two flavours... enc+dec and enc 76 HEADERS=src/headers/tommath_superclass.h src/headers/tomcrypt_cfg.h \
80 aes_enc.obj: aes.c aes_tab.c 77 src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h \
81 $(CC) $(CFLAGS) /DENCRYPT_ONLY /c aes.c /Foaes_enc.obj 78 src/headers/tomcrypt_custom.h src/headers/tomcrypt_argchk.h \
79 src/headers/tomcrypt_cipher.h src/headers/tomcrypt_pk.h \
80 src/headers/tommath_class.h src/headers/ltc_tommath.h src/headers/tomcrypt_hash.h \
81 src/headers/tomcrypt_misc.h src/headers/tomcrypt.h src/headers/tomcrypt_pkcs.h \
82 src/headers/tomcrypt_prng.h testprof/tomcrypt_test.h
83
84 #ciphers come in two flavours... enc+dec and enc
85 src/ciphers/aes/aes_enc.obj: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
86 $(CC) $(CFLAGS) /DENCRYPT_ONLY /c src/ciphers/aes/aes.c /Fosrc/ciphers/aes/aes_enc.obj
82 87
83 library: $(OBJECTS) 88 library: $(OBJECTS)
84 lib /out:tomcrypt.lib $(OBJECTS) 89 lib /out:tomcrypt.lib $(OBJECTS)
90 cd testprof
91 nmake -f makefile.msvc
92 cd ..
85 93
86 x86_prof: demos/x86_prof.c library
87 cl $(CFLAGS) demos/x86_prof.c tomcrypt.lib advapi32.lib
88
89 tv_gen: demos/tv_gen.c library 94 tv_gen: demos/tv_gen.c library
90 cl $(CFLAGS) demos/tv_gen.c tomcrypt.lib advapi32.lib 95 cl $(CFLAGS) demos/tv_gen.c tomcrypt.lib advapi32.lib
91 96
92 hashsum: demos/hashsum.c library 97 hashsum: demos/hashsum.c library
93 cl $(CFLAGS) demos/hashsum.c tomcrypt.lib advapi32.lib 98 cl $(CFLAGS) demos/hashsum.c tomcrypt.lib advapi32.lib
99
100 test: demos/test.c library
101 cl $(CFLAGS) demos/test.c testprof/tomcrypt_prof.lib tomcrypt.lib advapi32.lib
102
103 timing: demos/timing.c library
104 cl $(CFLAGS) demos/timing.c testprof/tomcrypt_prof.lib tomcrypt.lib advapi32.lib