annotate Makefile.in @ 138:b1edc9158f6c libtomcrypt

Pristine compilation works
author Matt Johnston <matt@ucc.asn.au>
date Fri, 17 Dec 2004 06:27:09 +0000
parents
children 7ed585a2c53b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
138
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 # MAKEFILE for linux GCC
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2 #
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 # Tom St Denis
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4 # Modified by Clay Culver
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5 #
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 # NOTE: This should later be replaced by autoconf/automake scripts, but for
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
7 # the time being this is actually pretty clean. The only ugly part is
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
8 # handling CFLAGS so that the x86 specific optimizations don't break
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9 # a build. This is easy to remedy though, for those that have problems.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11 # The version
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12 VERSION=0.96
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14 VPATH=@srcdir@
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 srcdir=@srcdir@
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17 # Compiler and Linker Names
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18 #CC=gcc
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
19 #LD=ld
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
20
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
21 # Archiver [makes .a files]
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
22 #AR=ar
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
23 #ARFLAGS=r
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
24
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
25 # Compilation flags. Note the += does not write over the user's CFLAGS!
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
26 # The rest of the flags come from the parent Dropbear makefile
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
27 CFLAGS += -c -I$(srcdir)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
28 # -Werror
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
29
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
30 # optimize for SPEED
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
31 #CFLAGS += -O3 -funroll-loops
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
32
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
33 #add -fomit-frame-pointer. v3.2 is buggy for certain platforms!
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
34 #CFLAGS += -fomit-frame-pointer
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
35
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
36 # optimize for SIZE
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
37 #CFLAGS += -Os
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
38
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
39 # compile for DEBUGING
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
40 #CFLAGS += -g3
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
41 #ch1-01-3
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
42
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
43 #These flags control how the library gets built.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
44
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
45 #Output filenames for various targets.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
46 LIBNAME=libtomcrypt.a
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
47 HASH=hashsum
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
48 CRYPT=encrypt
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
49 SMALL=small
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
50 PROF=x86_prof
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
51 TV=tv_gen
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
52
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
53 #LIBPATH-The directory for libtomcrypt to be installed to.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
54 #INCPATH-The directory to install the header files for libtomcrypt.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
55 #DATAPATH-The directory to install the pdf docs.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
56 DESTDIR=
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
57 LIBPATH=/usr/lib
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
58 INCPATH=/usr/include
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
59 DATAPATH=/usr/share/doc/libtomcrypt/pdf
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
60
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
61 #List of objects to compile.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
62
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
63 #Leave MPI built-in or force developer to link against libtommath?
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
64 #MPIOBJECT=mpi.o
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
65 #Dropbear uses libtommath
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
66 MPIOBJECT=
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
67
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
68 OBJECTS=error_to_string.o mpi_to_ltc_error.o base64_encode.o base64_decode.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
69 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
70 crypt.o crypt_find_cipher.o crypt_find_hash_any.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
71 crypt_hash_is_valid.o crypt_register_hash.o crypt_unregister_prng.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
72 crypt_argchk.o crypt_find_cipher_any.o crypt_find_hash_id.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
73 crypt_prng_descriptor.o crypt_register_prng.o crypt_cipher_descriptor.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
74 crypt_find_cipher_id.o crypt_find_prng.o crypt_prng_is_valid.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
75 crypt_unregister_cipher.o crypt_cipher_is_valid.o crypt_find_hash.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
76 crypt_hash_descriptor.o crypt_register_cipher.o crypt_unregister_hash.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
77 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
78 sprng.o yarrow.o rc4.o rng_get_bytes.o rng_make_prng.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
79 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
80 rand_prime.o is_prime.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
81 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
82 ecc.o dh.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
83 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
84 rsa_decrypt_key.o rsa_encrypt_key.o rsa_exptmod.o rsa_free.o rsa_make_key.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
85 rsa_sign_hash.o rsa_verify_hash.o rsa_export.o rsa_import.o tim_exptmod.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
86 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
87 dsa_export.o dsa_free.o dsa_import.o dsa_make_key.o dsa_sign_hash.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
88 dsa_verify_hash.o dsa_verify_key.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
89 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
90 aes.o aes_enc.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
91 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
92 blowfish.o des.o safer_tab.o safer.o saferp.o rc2.o xtea.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
93 rc6.o rc5.o cast5.o noekeon.o twofish.o skipjack.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
94 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
95 md2.o md4.o md5.o sha1.o sha256.o sha512.o tiger.o whirl.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
96 rmd128.o rmd160.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
97 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
98 packet_store_header.o packet_valid_header.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
99 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
100 eax_addheader.o eax_decrypt.o eax_decrypt_verify_memory.o eax_done.o eax_encrypt.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
101 eax_encrypt_authenticate_memory.o eax_init.o eax_test.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
102 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
103 ocb_decrypt.o ocb_decrypt_verify_memory.o ocb_done_decrypt.o ocb_done_encrypt.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
104 ocb_encrypt.o ocb_encrypt_authenticate_memory.o ocb_init.o ocb_ntz.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
105 ocb_shift_xor.o ocb_test.o s_ocb_done.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
106 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
107 omac_done.o omac_file.o omac_init.o omac_memory.o omac_process.o omac_test.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
108 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
109 pmac_done.o pmac_file.o pmac_init.o pmac_memory.o pmac_ntz.o pmac_process.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
110 pmac_shift_xor.o pmac_test.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
111 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
112 cbc_start.o cbc_encrypt.o cbc_decrypt.o cbc_getiv.o cbc_setiv.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
113 cfb_start.o cfb_encrypt.o cfb_decrypt.o cfb_getiv.o cfb_setiv.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
114 ofb_start.o ofb_encrypt.o ofb_decrypt.o ofb_getiv.o ofb_setiv.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
115 ctr_start.o ctr_encrypt.o ctr_decrypt.o ctr_getiv.o ctr_setiv.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
116 ecb_start.o ecb_encrypt.o ecb_decrypt.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
117 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
118 hash_file.o hash_filehandle.o hash_memory.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
119 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
120 hmac_done.o hmac_file.o hmac_init.o hmac_memory.o hmac_process.o hmac_test.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
121 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
122 pkcs_1_mgf1.o pkcs_1_oaep_encode.o pkcs_1_oaep_decode.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
123 pkcs_1_pss_encode.o pkcs_1_pss_decode.o pkcs_1_i2osp.o pkcs_1_os2ip.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
124 pkcs_1_v15_es_encode.o pkcs_1_v15_es_decode.o pkcs_1_v15_sa_encode.o pkcs_1_v15_sa_decode.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
125 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
126 pkcs_5_1.o pkcs_5_2.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
127 \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
128 burn_stack.o zeromem.o \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
129 $(MPIOBJECT)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
130
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
131 TESTOBJECTS=demos/test.o
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
132 HASHOBJECTS=demos/hashsum.o
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
133 CRYPTOBJECTS=demos/encrypt.o
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
134 SMALLOBJECTS=demos/small.o
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
135 PROFS=demos/x86_prof.o
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
136 TVS=demos/tv_gen.o
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
137
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
138 #Files left over from making the crypt.pdf.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
139 LEFTOVERS=*.dvi *.log *.aux *.toc *.idx *.ilg *.ind *.out
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
140
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
141 #Compressed filenames
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
142 COMPRESSED=crypt-$(VERSION).tar.bz2 crypt-$(VERSION).zip
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
143
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
144 #Header files used by libtomcrypt.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
145 HEADERS=ltc_tommath.h mycrypt_cfg.h \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
146 mycrypt_misc.h mycrypt_prng.h mycrypt_cipher.h mycrypt_hash.h \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
147 mycrypt_macros.h mycrypt_pk.h mycrypt.h mycrypt_argchk.h \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
148 mycrypt_custom.h mycrypt_pkcs.h
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
149
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
150 #The default rule for make builds the libtomcrypt library.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
151 default:library
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
152
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
153 #ciphers come in two flavours... enc+dec and enc
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
154 aes_enc.o: aes.c aes_tab.c
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
155 $(CC) $(CFLAGS) -DENCRYPT_ONLY -c $(srcdir)/aes.c -o aes_enc.o
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
156
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
157 #These are the rules to make certain object files.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
158 ecc.o: ecc.c ecc_sys.c
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
159 dh.o: dh.c dh_sys.c
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
160 sha512.o: sha512.c sha384.c
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
161 sha256.o: sha256.c sha224.c
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
162
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
163 #This rule makes the libtomcrypt library.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
164 library: $(LIBNAME)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
165
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
166 $(LIBNAME): $(OBJECTS)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
167 $(AR) $(ARFLAGS) $@ $(OBJECTS)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
168 $(RANLIB) $@
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
169
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
170 #This rule makes the hash program included with libtomcrypt
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
171 hashsum: library $(HASHOBJECTS)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
172 $(CC) $(HASHOBJECTS) $(LIBNAME) -o $(HASH) $(WARN)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
173
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
174 #makes the crypt program
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
175 crypt: library $(CRYPTOBJECTS)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
176 $(CC) $(CRYPTOBJECTS) $(LIBNAME) -o $(CRYPT) $(WARN)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
177
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
178 #makes the small program
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
179 small: library $(SMALLOBJECTS)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
180 $(CC) $(SMALLOBJECTS) $(LIBNAME) -o $(SMALL) $(WARN)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
181
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
182 x86_prof: library $(PROFS)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
183 $(CC) $(PROFS) $(LIBNAME) -o $(PROF)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
184
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
185 tv_gen: library $(TVS)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
186 $(CC) $(TVS) $(LIBNAME) -o $(TV)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
187
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
188 #This rule installs the library and the header files. This must be run
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
189 #as root in order to have a high enough permission to write to the correct
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
190 #directories and to set the owner and group to root.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
191 install: library docs
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
192 install -d -g root -o root $(DESTDIR)$(LIBPATH)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
193 install -d -g root -o root $(DESTDIR)$(INCPATH)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
194 install -d -g root -o root $(DESTDIR)$(DATAPATH)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
195 install -g root -o root $(LIBNAME) $(DESTDIR)$(LIBPATH)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
196 install -g root -o root $(HEADERS) $(DESTDIR)$(INCPATH)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
197 install -g root -o root doc/crypt.pdf $(DESTDIR)$(DATAPATH)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
198
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
199 #This rule cleans the source tree of all compiled code, not including the pdf
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
200 #documentation.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
201 clean:
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
202 -rm -f $(OBJECTS) $(TESTOBJECTS) $(HASHOBJECTS) $(CRYPTOBJECTS) $(SMALLOBJECTS) $(LEFTOVERS) $(LIBNAME)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
203 -rm -f $(TEST) $(HASH) $(COMPRESSED) $(PROFS) $(PROF) $(TVS) $(TV)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
204 -rm -f *.a *.dll *stackdump *.lib *.exe *.obj demos/*.obj demos/*.o *.bat *.txt *.il *.da demos/*.il demos/*.da *.dyn *.dpi \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
205 *.gcda *.gcno demos/*.gcno demos/*.gcda *~ doc/*
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
206 -cd demos/test && make clean
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
207
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
208 #This builds the crypt.pdf file. Note that the rm -f *.pdf has been removed
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
209 #from the clean command! This is because most people would like to keep the
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
210 #nice pre-compiled crypt.pdf that comes with libtomcrypt! We only need to
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
211 #delete it if we are rebuilding it.
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
212 docs: crypt.tex
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
213 -rm -f doc/crypt.pdf $(LEFTOVERS)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
214 echo "hello" > crypt.ind
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
215 latex crypt > /dev/null
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
216 makeindex crypt > /dev/null
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
217 latex crypt > /dev/null
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
218 latex crypt > /dev/null
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
219 dvipdf crypt
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
220 mv -ivf crypt.pdf doc/crypt.pdf
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
221 -rm -f $(LEFTOVERS)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
222
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
223 docdvi: crypt.tex
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
224 echo hello > crypt.ind
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
225 latex crypt > /dev/null
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
226 latex crypt > /dev/null
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
227 makeindex crypt
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
228 latex crypt > /dev/null
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
229
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
230 #beta
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
231 beta: clean
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
232 cd .. ; rm -rf crypt* libtomcrypt-$(VERSION)-beta ; mkdir libtomcrypt-$(VERSION)-beta ; \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
233 cp -R ./libtomcrypt/* ./libtomcrypt-$(VERSION)-beta/ ; tar -c libtomcrypt-$(VERSION)-beta/* > crypt-$(VERSION)-beta.tar ; \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
234 bzip2 -9vv crypt-$(VERSION)-beta.tar ; zip -9 -r crypt-$(VERSION)-beta.zip libtomcrypt-$(VERSION)-beta/*
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
235
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
236 #zipup the project (take that!)
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
237 zipup: clean docs
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
238 cd .. ; rm -rf crypt* libtomcrypt-$(VERSION) ; mkdir libtomcrypt-$(VERSION) ; \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
239 cp -R ./libtomcrypt/* ./libtomcrypt-$(VERSION)/ ; tar -c libtomcrypt-$(VERSION)/* > crypt-$(VERSION).tar ; \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
240 bzip2 -9vv crypt-$(VERSION).tar ; zip -9 -r crypt-$(VERSION).zip libtomcrypt-$(VERSION)/* ; \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
241 gpg -b -a crypt-$(VERSION).tar.bz2 ; \
b1edc9158f6c Pristine compilation works
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
242 gpg -b -a crypt-$(VERSION).zip