Mercurial > dropbear
comparison Makefile.in @ 213:7adce1fbdbff libtomcrypt
- try to properly rename Makefile and get it up-to-date with 1.05,
hopefully next time we propagate things will work correctly
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 06 Jul 2005 13:31:04 +0000 |
parents | 704bb050935f |
children | e5d119ea4c63 |
comparison
equal
deleted
inserted
replaced
212:a3e31d3983cb | 213:7adce1fbdbff |
---|---|
2 # | 2 # |
3 # Tom St Denis | 3 # Tom St Denis |
4 # Modified by Clay Culver | 4 # Modified by Clay Culver |
5 | 5 |
6 # The version | 6 # The version |
7 VERSION=1.02 | 7 VERSION=1.05 |
8 | 8 |
9 VPATH=@srcdir@ | 9 VPATH=@srcdir@ |
10 srcdir=@srcdir@ | 10 srcdir=@srcdir@ |
11 | 11 |
12 # Compiler and Linker Names | 12 # Compiler and Linker Names |
27 | 27 |
28 # optimize for SPEED | 28 # optimize for SPEED |
29 #CFLAGS += -O3 -funroll-loops | 29 #CFLAGS += -O3 -funroll-loops |
30 | 30 |
31 # add -fomit-frame-pointer. hinders debugging! | 31 # add -fomit-frame-pointer. hinders debugging! |
32 CFLAGS += -fomit-frame-pointer | 32 #CFLAGS += -fomit-frame-pointer |
33 | 33 |
34 # optimize for SIZE | 34 # optimize for SIZE |
35 #CFLAGS += -Os -DLTC_SMALL_CODE | 35 #CFLAGS += -Os -DLTC_SMALL_CODE |
36 | 36 |
37 # older GCCs can't handle the "rotate with immediate" ROLc/RORc/etc macros | 37 # older GCCs can't handle the "rotate with immediate" ROLc/RORc/etc macros |
60 LIBPATH=/usr/lib | 60 LIBPATH=/usr/lib |
61 INCPATH=/usr/include | 61 INCPATH=/usr/include |
62 DATAPATH=/usr/share/doc/libtomcrypt/pdf | 62 DATAPATH=/usr/share/doc/libtomcrypt/pdf |
63 | 63 |
64 #Who do we install as? | 64 #Who do we install as? |
65 ifdef INSTALL_USER | |
66 USER=$(INSTALL_USER) | |
67 else | |
65 USER=root | 68 USER=root |
69 endif | |
70 | |
71 ifdef INSTALL_GROUP | |
72 GROUP=$(INSTALL_GROUP) | |
73 else | |
66 GROUP=wheel | 74 GROUP=wheel |
75 endif | |
67 | 76 |
68 #List of objects to compile. | 77 #List of objects to compile. |
69 | 78 |
70 #Leave MPI built-in or force developer to link against libtommath? | 79 #Leave MPI built-in or force developer to link against libtommath? |
71 #MPIOBJECT=src/misc/mpi/mpi.o | 80 #MPIOBJECT=src/misc/mpi/mpi.o |
72 #Dropbear uses libtommath | 81 #Dropbear uses libtommath |
73 MPIOBJECT= | 82 MPIOBJECT= |
74 | 83 |
75 OBJECTS=src/ciphers/aes/aes_enc.o $(MPIOBJECT) src/ciphers/aes/aes.o \ | 84 OBJECTS=src/ciphers/aes/aes_enc.o $(MPIOBJECT) src/ciphers/aes/aes.o src/ciphers/anubis.o \ |
76 src/ciphers/blowfish.o src/ciphers/des.o \ | 85 src/ciphers/blowfish.o src/ciphers/cast5.o src/ciphers/des.o src/ciphers/khazad.o src/ciphers/noekeon.o \ |
77 src/ciphers/twofish/twofish.o \ | 86 src/ciphers/rc2.o src/ciphers/rc5.o src/ciphers/rc6.o src/ciphers/safer/safer.o \ |
78 src/hashes/helper/hash_memory.o src/hashes/helper/hash_memory_multi.o \ | 87 src/ciphers/safer/safer_tab.o src/ciphers/safer/saferp.o src/ciphers/skipjack.o \ |
79 src/hashes/md5.o src/hashes/sha1.o src/hashes/sha2/sha256.o \ | 88 src/ciphers/twofish/twofish.o src/ciphers/xtea.o src/encauth/ccm/ccm_memory.o \ |
80 src/hashes/sha2/sha512.o src/hashes/whirl/whirl.o src/mac/hmac/hmac_done.o \ | 89 src/encauth/ccm/ccm_test.o src/encauth/eax/eax_addheader.o src/encauth/eax/eax_decrypt.o \ |
90 src/encauth/eax/eax_decrypt_verify_memory.o src/encauth/eax/eax_done.o src/encauth/eax/eax_encrypt.o \ | |
91 src/encauth/eax/eax_encrypt_authenticate_memory.o src/encauth/eax/eax_init.o \ | |
92 src/encauth/eax/eax_test.o src/encauth/gcm/gcm_add_aad.o src/encauth/gcm/gcm_add_iv.o \ | |
93 src/encauth/gcm/gcm_done.o src/encauth/gcm/gcm_gf_mult.o src/encauth/gcm/gcm_init.o \ | |
94 src/encauth/gcm/gcm_memory.o src/encauth/gcm/gcm_process.o src/encauth/gcm/gcm_reset.o \ | |
95 src/encauth/gcm/gcm_test.o src/encauth/ocb/ocb_decrypt.o src/encauth/ocb/ocb_decrypt_verify_memory.o \ | |
96 src/encauth/ocb/ocb_done_decrypt.o src/encauth/ocb/ocb_done_encrypt.o src/encauth/ocb/ocb_encrypt.o \ | |
97 src/encauth/ocb/ocb_encrypt_authenticate_memory.o src/encauth/ocb/ocb_init.o src/encauth/ocb/ocb_ntz.o \ | |
98 src/encauth/ocb/ocb_shift_xor.o src/encauth/ocb/ocb_test.o src/encauth/ocb/s_ocb_done.o \ | |
99 src/hashes/chc/chc.o src/hashes/helper/hash_file.o src/hashes/helper/hash_filehandle.o \ | |
100 src/hashes/helper/hash_memory.o src/hashes/helper/hash_memory_multi.o src/hashes/md2.o src/hashes/md4.o \ | |
101 src/hashes/md5.o src/hashes/rmd128.o src/hashes/rmd160.o src/hashes/sha1.o src/hashes/sha2/sha256.o \ | |
102 src/hashes/sha2/sha512.o src/hashes/tiger.o src/hashes/whirl/whirl.o src/mac/hmac/hmac_done.o \ | |
81 src/mac/hmac/hmac_file.o src/mac/hmac/hmac_init.o src/mac/hmac/hmac_memory.o \ | 103 src/mac/hmac/hmac_file.o src/mac/hmac/hmac_init.o src/mac/hmac/hmac_memory.o \ |
82 src/mac/hmac/hmac_memory_multi.o src/mac/hmac/hmac_process.o src/mac/hmac/hmac_test.o \ | 104 src/mac/hmac/hmac_memory_multi.o src/mac/hmac/hmac_process.o src/mac/hmac/hmac_test.o \ |
83 src/misc/base64/base64_decode.o \ | 105 src/mac/omac/omac_done.o src/mac/omac/omac_file.o src/mac/omac/omac_init.o src/mac/omac/omac_memory.o \ |
106 src/mac/omac/omac_memory_multi.o src/mac/omac/omac_process.o src/mac/omac/omac_test.o \ | |
107 src/mac/pelican/pelican.o src/mac/pelican/pelican_memory.o src/mac/pelican/pelican_test.o \ | |
108 src/mac/pmac/pmac_done.o src/mac/pmac/pmac_file.o src/mac/pmac/pmac_init.o src/mac/pmac/pmac_memory.o \ | |
109 src/mac/pmac/pmac_memory_multi.o src/mac/pmac/pmac_ntz.o src/mac/pmac/pmac_process.o \ | |
110 src/mac/pmac/pmac_shift_xor.o src/mac/pmac/pmac_test.o src/misc/base64/base64_decode.o \ | |
84 src/misc/base64/base64_encode.o src/misc/burn_stack.o src/misc/crypt/crypt.o \ | 111 src/misc/base64/base64_encode.o src/misc/burn_stack.o src/misc/crypt/crypt.o \ |
85 src/misc/crypt/crypt_argchk.o src/misc/crypt/crypt_cipher_descriptor.o \ | 112 src/misc/crypt/crypt_argchk.o src/misc/crypt/crypt_cipher_descriptor.o \ |
86 src/misc/crypt/crypt_cipher_is_valid.o src/misc/crypt/crypt_find_cipher.o \ | 113 src/misc/crypt/crypt_cipher_is_valid.o src/misc/crypt/crypt_find_cipher.o \ |
87 src/misc/crypt/crypt_find_cipher_any.o src/misc/crypt/crypt_find_cipher_id.o \ | 114 src/misc/crypt/crypt_find_cipher_any.o src/misc/crypt/crypt_find_cipher_id.o \ |
88 src/misc/crypt/crypt_find_hash.o src/misc/crypt/crypt_find_hash_any.o \ | 115 src/misc/crypt/crypt_find_hash.o src/misc/crypt/crypt_find_hash_any.o \ |
91 src/misc/crypt/crypt_prng_descriptor.o src/misc/crypt/crypt_prng_is_valid.o \ | 118 src/misc/crypt/crypt_prng_descriptor.o src/misc/crypt/crypt_prng_is_valid.o \ |
92 src/misc/crypt/crypt_register_cipher.o src/misc/crypt/crypt_register_hash.o \ | 119 src/misc/crypt/crypt_register_cipher.o src/misc/crypt/crypt_register_hash.o \ |
93 src/misc/crypt/crypt_register_prng.o src/misc/crypt/crypt_unregister_cipher.o \ | 120 src/misc/crypt/crypt_register_prng.o src/misc/crypt/crypt_unregister_cipher.o \ |
94 src/misc/crypt/crypt_unregister_hash.o src/misc/crypt/crypt_unregister_prng.o \ | 121 src/misc/crypt/crypt_unregister_hash.o src/misc/crypt/crypt_unregister_prng.o \ |
95 src/misc/error_to_string.o src/misc/mpi/is_prime.o src/misc/mpi/mpi_to_ltc_error.o \ | 122 src/misc/error_to_string.o src/misc/mpi/is_prime.o src/misc/mpi/mpi_to_ltc_error.o \ |
96 src/misc/mpi/rand_prime.o src/misc/zeromem.o \ | 123 src/misc/mpi/rand_prime.o src/misc/pkcs5/pkcs_5_1.o src/misc/pkcs5/pkcs_5_2.o src/misc/zeromem.o \ |
97 src/modes/cbc/cbc_decrypt.o src/modes/cbc/cbc_done.o src/modes/cbc/cbc_encrypt.o \ | 124 src/modes/cbc/cbc_decrypt.o src/modes/cbc/cbc_done.o src/modes/cbc/cbc_encrypt.o \ |
98 src/modes/cbc/cbc_getiv.o src/modes/cbc/cbc_setiv.o src/modes/cbc/cbc_start.o \ | 125 src/modes/cbc/cbc_getiv.o src/modes/cbc/cbc_setiv.o src/modes/cbc/cbc_start.o \ |
126 src/modes/cfb/cfb_decrypt.o src/modes/cfb/cfb_done.o src/modes/cfb/cfb_encrypt.o \ | |
127 src/modes/cfb/cfb_getiv.o src/modes/cfb/cfb_setiv.o src/modes/cfb/cfb_start.o \ | |
99 src/modes/ctr/ctr_decrypt.o src/modes/ctr/ctr_done.o src/modes/ctr/ctr_encrypt.o \ | 128 src/modes/ctr/ctr_decrypt.o src/modes/ctr/ctr_done.o src/modes/ctr/ctr_encrypt.o \ |
100 src/modes/ctr/ctr_getiv.o src/modes/ctr/ctr_setiv.o src/modes/ctr/ctr_start.o \ | 129 src/modes/ctr/ctr_getiv.o src/modes/ctr/ctr_setiv.o src/modes/ctr/ctr_start.o \ |
101 src/modes/ecb/ecb_decrypt.o src/modes/ecb/ecb_done.o src/modes/ecb/ecb_encrypt.o \ | 130 src/modes/ecb/ecb_decrypt.o src/modes/ecb/ecb_done.o src/modes/ecb/ecb_encrypt.o \ |
102 src/modes/ofb/ofb_start.o src/pk/asn1/der/der_decode_integer.o \ | 131 src/modes/ecb/ecb_start.o src/modes/ofb/ofb_decrypt.o src/modes/ofb/ofb_done.o \ |
103 src/prngs/rng_get_bytes.o \ | 132 src/modes/ofb/ofb_encrypt.o src/modes/ofb/ofb_getiv.o src/modes/ofb/ofb_setiv.o \ |
104 src/prngs/rng_make_prng.o src/prngs/sober128.o src/prngs/sprng.o src/prngs/yarrow.o | 133 src/modes/ofb/ofb_start.o |
105 | 134 |
106 HEADERS=src/headers/tommath_superclass.h src/headers/tomcrypt_cfg.h \ | 135 HEADERS=src/headers/tommath_superclass.h src/headers/tomcrypt_cfg.h src/headers/tomcrypt_mac.h \ |
107 src/headers/tomcrypt_mac.h src/headers/tomcrypt_macros.h \ | 136 src/headers/tomcrypt_macros.h src/headers/tomcrypt_custom.h src/headers/tomcrypt_argchk.h \ |
108 src/headers/tomcrypt_custom.h src/headers/tomcrypt_argchk.h \ | 137 src/headers/tomcrypt_cipher.h src/headers/tomcrypt_pk.h src/headers/tommath_class.h \ |
109 src/headers/tomcrypt_cipher.h src/headers/tomcrypt_pk.h \ | 138 src/headers/ltc_tommath.h src/headers/tomcrypt_hash.h src/headers/tomcrypt_misc.h \ |
110 src/headers/tommath_class.h src/headers/ltc_tommath.h src/headers/tomcrypt_hash.h \ | 139 src/headers/tomcrypt.h src/headers/tomcrypt_pkcs.h src/headers/tomcrypt_prng.h testprof/tomcrypt_test.h |
111 src/headers/tomcrypt_misc.h src/headers/tomcrypt.h src/headers/tomcrypt_pkcs.h \ | |
112 src/headers/tomcrypt_prng.h testprof/tomcrypt_test.h | |
113 | 140 |
114 TESTOBJECTS=demos/test.o | 141 TESTOBJECTS=demos/test.o |
115 HASHOBJECTS=demos/hashsum.o | 142 HASHOBJECTS=demos/hashsum.o |
116 CRYPTOBJECTS=demos/encrypt.o | 143 CRYPTOBJECTS=demos/encrypt.o |
117 SMALLOBJECTS=demos/small.o | 144 SMALLOBJECTS=demos/small.o |
141 src/pk/dh/dh.o: src/pk/dh/dh.c src/pk/dh/dh_sys.c | 168 src/pk/dh/dh.o: src/pk/dh/dh.c src/pk/dh/dh_sys.c |
142 src/hashes/sha2/sha512.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha384.c | 169 src/hashes/sha2/sha512.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha384.c |
143 src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c | 170 src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c |
144 | 171 |
145 #This rule makes the libtomcrypt library. | 172 #This rule makes the libtomcrypt library. |
146 #library: $(LIBTEST) $(LIBNAME) | |
147 # Dropbear doesn't want test programs, since it relies on yarrow etc. | |
148 library: $(LIBNAME) | 173 library: $(LIBNAME) |
149 | 174 |
150 $(LIBTEST): | 175 $(LIBTEST): |
151 cd testprof ; CFLAGS="$(CFLAGS)" make | 176 cd testprof ; CFLAGS="$(CFLAGS)" make |
152 | 177 |
165 #makes the small program | 190 #makes the small program |
166 small: library $(SMALLOBJECTS) | 191 small: library $(SMALLOBJECTS) |
167 $(CC) $(SMALLOBJECTS) $(LIBNAME) -o $(SMALL) $(WARN) | 192 $(CC) $(SMALLOBJECTS) $(LIBNAME) -o $(SMALL) $(WARN) |
168 | 193 |
169 tv_gen: library $(TVS) | 194 tv_gen: library $(TVS) |
170 $(CC) $(TVS) $(LIBNAME) $(EXTRALIBS) -o $(TV) | 195 $(CC) $(TVS) $(LIBNAME) -o $(TV) |
171 | 196 |
172 multi: library $(MULTIS) | 197 multi: library $(MULTIS) |
173 $(CC) $(MULTIS) $(LIBNAME) -o $(MULTI) | 198 $(CC) $(MULTIS) $(LIBNAME) -o $(MULTI) |
174 | 199 |
175 timing: library $(TIMINGS) | 200 timing: library $(LIBTEST) $(TIMINGS) |
176 $(CC) $(TIMINGS) $(LIBTEST) $(LIBNAME) -o $(TIMING) | 201 $(CC) $(TIMINGS) $(LIBTEST) $(LIBNAME) $(EXTRALIBS) -o $(TIMING) |
177 | 202 |
178 test: library $(TESTS) | 203 test: library $(LIBTEST) $(TESTS) |
179 $(CC) $(TESTS) $(LIBTEST) $(LIBNAME) -o $(TEST) | 204 $(CC) $(TESTS) $(LIBTEST) $(LIBNAME) -o $(TEST) |
180 | 205 |
181 | 206 |
182 #This rule installs the library and the header files. This must be run | 207 #This rule installs the library and the header files. This must be run |
183 #as root in order to have a high enough permission to write to the correct | 208 #as root in order to have a high enough permission to write to the correct |
188 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(DATAPATH) | 213 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(DATAPATH) |
189 install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH) | 214 install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH) |
190 install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) | 215 install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) |
191 install -g $(GROUP) -o $(USER) doc/crypt.pdf $(DESTDIR)$(DATAPATH) | 216 install -g $(GROUP) -o $(USER) doc/crypt.pdf $(DESTDIR)$(DATAPATH) |
192 | 217 |
193 install_lib: library | 218 install_test: $(LIBTEST) |
194 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) | 219 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) |
195 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) | 220 install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) |
196 install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH) | 221 install -g $(GROUP) -o $(USER) $(LIBTEST) $(DESTDIR)$(LIBPATH) |
197 install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) | 222 |
223 profile: | |
224 CFLAGS="$(CFLAGS) -fprofile-generate" make timing EXTRALIBS=-lgcov | |
225 ./timing | |
226 rm -f timing `find . -type f | grep [.][ao] | xargs` | |
227 CFLAGS="$(CFLAGS) -fprofile-use" make timing EXTRALIBS=-lgcov | |
228 | |
198 | 229 |
199 #This rule cleans the source tree of all compiled code, not including the pdf | 230 #This rule cleans the source tree of all compiled code, not including the pdf |
200 #documentation. | 231 #documentation. |
201 clean: | 232 clean: |
202 rm -f `find . -type f | grep "[.]o" | xargs` | 233 rm -f `find . -type f | grep "[.]o" | xargs` |
214 rm -rf `find . -type d | grep "[.]libs" | xargs` | 245 rm -rf `find . -type d | grep "[.]libs" | xargs` |
215 rm -f crypt.aux crypt.dvi crypt.idx crypt.ilg crypt.ind crypt.log crypt.toc | 246 rm -f crypt.aux crypt.dvi crypt.idx crypt.ilg crypt.ind crypt.log crypt.toc |
216 rm -f $(TV) $(PROF) $(SMALL) $(CRYPT) $(HASHSUM) $(MULTI) $(TIMING) $(TEST) | 247 rm -f $(TV) $(PROF) $(SMALL) $(CRYPT) $(HASHSUM) $(MULTI) $(TIMING) $(TEST) |
217 rm -rf doc/doxygen | 248 rm -rf doc/doxygen |
218 rm -f doc/*.pdf | 249 rm -f doc/*.pdf |
250 rm -f *.txt | |
219 | 251 |
220 #build the doxy files (requires Doxygen, tetex and patience) | 252 #build the doxy files (requires Doxygen, tetex and patience) |
221 doxy: | 253 doxy: |
222 doxygen | 254 doxygen |
223 cd doc/doxygen/latex ; make ; mv -f refman.pdf ../../. | 255 cd doc/doxygen/latex ; make ; mv -f refman.pdf ../../. |
246 latex crypt > /dev/null | 278 latex crypt > /dev/null |
247 | 279 |
248 #zipup the project (take that!) | 280 #zipup the project (take that!) |
249 no_oops: clean | 281 no_oops: clean |
250 cd .. ; cvs commit | 282 cd .. ; cvs commit |
283 echo Scanning for scratch/dirty files | |
284 find . -type f | grep -v CVS | xargs -n 1 bash mess.sh | |
251 | 285 |
252 zipup: no_oops docs | 286 zipup: no_oops docs |
253 cd .. ; rm -rf crypt* libtomcrypt-$(VERSION) ; mkdir libtomcrypt-$(VERSION) ; \ | 287 cd .. ; rm -rf crypt* libtomcrypt-$(VERSION) ; mkdir libtomcrypt-$(VERSION) ; \ |
254 cp -R ./libtomcrypt/* ./libtomcrypt-$(VERSION)/ ; \ | 288 cp -R ./libtomcrypt/* ./libtomcrypt-$(VERSION)/ ; \ |
255 cd libtomcrypt-$(VERSION) ; rm -rf `find . -type d | grep CVS | xargs` ; cd .. ; \ | 289 cd libtomcrypt-$(VERSION) ; rm -rf `find . -type d | grep CVS | xargs` ; cd .. ; \ |
256 tar -cjvf crypt-$(VERSION).tar.bz2 libtomcrypt-$(VERSION) ; \ | 290 tar -cjvf crypt-$(VERSION).tar.bz2 libtomcrypt-$(VERSION) ; \ |
257 zip -9r crypt-$(VERSION).zip libtomcrypt-$(VERSION) ; \ | 291 zip -9r crypt-$(VERSION).zip libtomcrypt-$(VERSION) ; \ |
258 gpg -b -a crypt-$(VERSION).tar.bz2 ; gpg -b -a crypt-$(VERSION).zip ; \ | 292 gpg -b -a crypt-$(VERSION).tar.bz2 ; gpg -b -a crypt-$(VERSION).zip ; \ |
259 mv -fv crypt* ~ ; rm -rf libtomcrypt-$(VERSION) | 293 mv -fv crypt* ~ ; rm -rf libtomcrypt-$(VERSION) |
294 | |
295 | |
296 # $Source: /cvs/libtom/libtomcrypt/makefile,v $ | |
297 # $Revision: 1.70 $ | |
298 # $Date: 2005/06/19 18:03:24 $ |