annotate makefile.shared @ 143:5d99163f7e32 libtomcrypt-orig

import of libtomcrypt 0.99
author Matt Johnston <matt@ucc.asn.au>
date Sun, 19 Dec 2004 11:34:45 +0000
parents
children 1c15b283127b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
143
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 # MAKEFILE for linux GCC
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2 #
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 # Tom St Denis
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4 # Modified by Clay Culver
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 # The version
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7 VERSION=0:99
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
8
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9 # Compiler and Linker Names
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10 CC=libtool --mode=compile gcc
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12 # Archiver [makes .a files]
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13 AR=libtool --mode=link
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 # Compilation flags. Note the += does not write over the user's CFLAGS!
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16 CFLAGS += -c -I./ -Wall -Wsign-compare -W -Wshadow
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17 # -Werror
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
19 # optimize for SPEED
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
20 CFLAGS += -O3 -funroll-all-loops
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
21
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
22 #add -fomit-frame-pointer. hinders debugging!
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
23 CFLAGS += -fomit-frame-pointer
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
24
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
25 # optimize for SIZE
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
26 #CFLAGS += -Os
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
27
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
28 # compile for DEBUGING (required for ccmalloc checking!!!)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
29 #CFLAGS += -g3
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
30
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
31 #These flags control how the library gets built.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
32
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
33 #Output filenames for various targets.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
34 LIBNAME=libtomcrypt.la
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
35 HASH=hashsum
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
36 CRYPT=encrypt
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
37 SMALL=small
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
38 PROF=x86_prof
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
39 TV=tv_gen
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
40
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
41 #LIBPATH-The directory for libtomcrypt to be installed to.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
42 #INCPATH-The directory to install the header files for libtomcrypt.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
43 #DATAPATH-The directory to install the pdf docs.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
44 DESTDIR=
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
45 LIBPATH=/usr/lib
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
46 INCPATH=/usr/include
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
47 DATAPATH=/usr/share/doc/libtomcrypt/pdf
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
48
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
49 #List of objects to compile.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
50
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
51 #Leave MPI built-in or force developer to link against libtommath?
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
52 MPIOBJECT=mpi.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
53
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
54 #If you don't want mpi.o then add this
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
55 #MPISHARED=$(LIBPATH)/libtommath.la
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
56
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
57 OBJECTS=error_to_string.o mpi_to_ltc_error.o base64_encode.o base64_decode.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
58 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
59 crypt.o crypt_find_cipher.o crypt_find_hash_any.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
60 crypt_hash_is_valid.o crypt_register_hash.o crypt_unregister_prng.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
61 crypt_argchk.o crypt_find_cipher_any.o crypt_find_hash_id.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
62 crypt_prng_descriptor.o crypt_register_prng.o crypt_cipher_descriptor.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
63 crypt_find_cipher_id.o crypt_find_prng.o crypt_prng_is_valid.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
64 crypt_unregister_cipher.o crypt_cipher_is_valid.o crypt_find_hash.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
65 crypt_hash_descriptor.o crypt_register_cipher.o crypt_unregister_hash.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
66 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
67 sober128.o fortuna.o sprng.o yarrow.o rc4.o rng_get_bytes.o rng_make_prng.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
68 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
69 rand_prime.o is_prime.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
70 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
71 ecc.o dh.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
72 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
73 rsa_decrypt_key.o rsa_encrypt_key.o rsa_exptmod.o rsa_free.o rsa_make_key.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
74 rsa_sign_hash.o rsa_verify_hash.o rsa_export.o rsa_import.o tim_exptmod.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
75 rsa_v15_encrypt_key.o rsa_v15_decrypt_key.o rsa_v15_sign_hash.o rsa_v15_verify_hash.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
76 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
77 dsa_export.o dsa_free.o dsa_import.o dsa_make_key.o dsa_sign_hash.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
78 dsa_verify_hash.o dsa_verify_key.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
79 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
80 aes.o aes_enc.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
81 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
82 blowfish.o des.o safer_tab.o safer.o saferp.o rc2.o xtea.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
83 rc6.o rc5.o cast5.o noekeon.o twofish.o skipjack.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
84 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
85 md2.o md4.o md5.o sha1.o sha256.o sha512.o tiger.o whirl.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
86 rmd128.o rmd160.o chc.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
87 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
88 packet_store_header.o packet_valid_header.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
89 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
90 eax_addheader.o eax_decrypt.o eax_decrypt_verify_memory.o eax_done.o eax_encrypt.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
91 eax_encrypt_authenticate_memory.o eax_init.o eax_test.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
92 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
93 ocb_decrypt.o ocb_decrypt_verify_memory.o ocb_done_decrypt.o ocb_done_encrypt.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
94 ocb_encrypt.o ocb_encrypt_authenticate_memory.o ocb_init.o ocb_ntz.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
95 ocb_shift_xor.o ocb_test.o s_ocb_done.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
96 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
97 omac_done.o omac_file.o omac_init.o omac_memory.o omac_process.o omac_test.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
98 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
99 pmac_done.o pmac_file.o pmac_init.o pmac_memory.o pmac_ntz.o pmac_process.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
100 pmac_shift_xor.o pmac_test.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
101 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
102 cbc_start.o cbc_encrypt.o cbc_decrypt.o cbc_getiv.o cbc_setiv.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
103 cfb_start.o cfb_encrypt.o cfb_decrypt.o cfb_getiv.o cfb_setiv.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
104 ofb_start.o ofb_encrypt.o ofb_decrypt.o ofb_getiv.o ofb_setiv.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
105 ctr_start.o ctr_encrypt.o ctr_decrypt.o ctr_getiv.o ctr_setiv.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
106 ecb_start.o ecb_encrypt.o ecb_decrypt.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
107 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
108 hash_file.o hash_filehandle.o hash_memory.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
109 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
110 hmac_done.o hmac_file.o hmac_init.o hmac_memory.o hmac_process.o hmac_test.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
111 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
112 pkcs_1_mgf1.o pkcs_1_oaep_encode.o pkcs_1_oaep_decode.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
113 pkcs_1_pss_encode.o pkcs_1_pss_decode.o pkcs_1_i2osp.o pkcs_1_os2ip.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
114 pkcs_1_v15_es_encode.o pkcs_1_v15_es_decode.o pkcs_1_v15_sa_encode.o pkcs_1_v15_sa_decode.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
115 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
116 pkcs_5_1.o pkcs_5_2.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
117 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
118 der_encode_integer.o der_decode_integer.o der_length_integer.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
119 der_put_multi_integer.o der_get_multi_integer.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
120 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
121 burn_stack.o zeromem.o \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
122 \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
123 $(MPIOBJECT)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
124
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
125 TESTOBJECTS=demos/test.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
126 HASHOBJECTS=demos/hashsum.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
127 CRYPTOBJECTS=demos/encrypt.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
128 SMALLOBJECTS=demos/small.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
129 PROFS=demos/x86_prof.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
130 TVS=demos/tv_gen.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
131
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
132 #Files left over from making the crypt.pdf.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
133 LEFTOVERS=*.dvi *.log *.aux *.toc *.idx *.ilg *.ind *.out
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
134
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
135 #Compressed filenames
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
136 COMPRESSED=crypt-$(VERSION).tar.bz2 crypt-$(VERSION).zip
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
137
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
138 #Header files used by libtomcrypt.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
139 HEADERS=ltc_tommath.h mycrypt_cfg.h \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
140 mycrypt_misc.h mycrypt_prng.h mycrypt_cipher.h mycrypt_hash.h \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
141 mycrypt_macros.h mycrypt_pk.h mycrypt.h mycrypt_argchk.h \
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
142 mycrypt_custom.h mycrypt_pkcs.h tommath_class.h tommath_superclass.h
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
143
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
144 #The default rule for make builds the libtomcrypt library.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
145 default:library
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
146
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
147 #ciphers come in two flavours... enc+dec and enc
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
148 aes_enc.o: aes.c aes_tab.c
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
149 $(CC) $(CFLAGS) -DENCRYPT_ONLY -c aes.c -o aes_enc.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
150
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
151 #These are the rules to make certain object files.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
152 aes.o: aes.c aes_tab.c
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
153 twofish.o: twofish.c twofish_tab.c
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
154 whirl.o: whirl.c whirltab.c
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
155 ecc.o: ecc.c ecc_sys.c
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
156 dh.o: dh.c dh_sys.c
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
157 sha512.o: sha512.c sha384.c
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
158 sha256.o: sha256.c sha224.c
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
159
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
160 #This rule makes the libtomcrypt library.
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
161 library: $(LIBNAME)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
162
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
163 $(LIBNAME): $(OBJECTS)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
164 libtool --mode=link gcc $(CFLAGS) *.lo -o libtomcrypt.la -rpath $(LIBPATH) -version-info $(VERSION)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
165 libtool --mode=link gcc $(CFLAGS) *.o -o libtomcrypt.a
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
166 libtool --mode=install install -c libtomcrypt.la $(LIBPATH)/libtomcrypt.la
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
167 install -d -g root -o root $(DESTDIR)$(INCPATH)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
168 install -g root -o root $(HEADERS) $(DESTDIR)$(INCPATH)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
169
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
170 #This rule makes the hash program included with libtomcrypt
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
171 hashsum: library
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
172 gcc $(CFLAGS) demos/hashsum.c -o hashsum.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
173 libtool --mode=link gcc -o hashsum hashsum.o -ltomcrypt $(MPISHARED)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
174
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
175 #makes the crypt program
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
176 crypt: library
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
177 gcc $(CFLAGS) demos/encrypt.c -o encrypt.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
178 libtool --mode=link gcc -o crypt encrypt.o -ltomcrypt $(MPISHARED)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
179
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
180 x86_prof: library
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
181 gcc $(CFLAGS) demos/x86_prof.c -o x86_prof.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
182 libtool --mode=link gcc -o x86_prof x86_prof.o -ltomcrypt $(MPISHARED) $(EXTRALIBS)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
183
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
184 tv_gen: library $(TVS)
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
185 gcc $(CFLAGS) demos/tv_gen.c -o tv_gen.o
5d99163f7e32 import of libtomcrypt 0.99
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
186 libtool --mode=link gcc -o tv_gen tv_gen.o -ltomcrypt $(MPISHARED)