Mercurial > dropbear
comparison Makefile.in @ 146:81bc23421b45 libtommath
Clean up the merge, remove some unneeded files etc
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sun, 19 Dec 2004 16:18:40 +0000 |
parents | cc04b085e7dd |
children | 9063ffd31799 |
comparison
equal
deleted
inserted
replaced
145:a96ff234ff19 | 146:81bc23421b45 |
---|---|
17 #CFLAGS += -Os | 17 #CFLAGS += -Os |
18 | 18 |
19 #x86 optimizations [should be valid for any GCC install though] | 19 #x86 optimizations [should be valid for any GCC install though] |
20 #CFLAGS += -fomit-frame-pointer | 20 #CFLAGS += -fomit-frame-pointer |
21 | 21 |
22 VERSION=0.30 | 22 #debug |
23 #CFLAGS += -g3 | |
24 | |
25 VERSION=0.32 | |
23 | 26 |
24 default: libtommath.a | 27 default: libtommath.a |
25 | 28 |
26 #default files to install | 29 #default files to install |
27 LIBNAME=libtommath.a | 30 LIBNAME=libtommath.a |
28 HEADERS=tommath.h | 31 HEADERS=tommath.h |
29 | 32 |
30 #LIBPATH-The directory for libtomcrypt to be installed to. | 33 #LIBPATH-The directory for libtommath to be installed to. |
31 #INCPATH-The directory to install the header files for libtommath. | 34 #INCPATH-The directory to install the header files for libtommath. |
32 #DATAPATH-The directory to install the pdf docs. | 35 #DATAPATH-The directory to install the pdf docs. |
33 DESTDIR= | 36 DESTDIR= |
34 LIBPATH=/usr/lib | 37 LIBPATH=/usr/lib |
35 INCPATH=/usr/include | 38 INCPATH=/usr/include |
55 bn_mp_dr_is_modulus.o bn_mp_dr_setup.o bn_mp_reduce_setup.o \ | 58 bn_mp_dr_is_modulus.o bn_mp_dr_setup.o bn_mp_reduce_setup.o \ |
56 bn_mp_toom_mul.o bn_mp_toom_sqr.o bn_mp_div_3.o bn_s_mp_exptmod.o \ | 59 bn_mp_toom_mul.o bn_mp_toom_sqr.o bn_mp_div_3.o bn_s_mp_exptmod.o \ |
57 bn_mp_reduce_2k.o bn_mp_reduce_is_2k.o bn_mp_reduce_2k_setup.o \ | 60 bn_mp_reduce_2k.o bn_mp_reduce_is_2k.o bn_mp_reduce_2k_setup.o \ |
58 bn_mp_radix_smap.o bn_mp_read_radix.o bn_mp_toradix.o bn_mp_radix_size.o \ | 61 bn_mp_radix_smap.o bn_mp_read_radix.o bn_mp_toradix.o bn_mp_radix_size.o \ |
59 bn_mp_fread.o bn_mp_fwrite.o bn_mp_cnt_lsb.o bn_error.o \ | 62 bn_mp_fread.o bn_mp_fwrite.o bn_mp_cnt_lsb.o bn_error.o \ |
60 bn_mp_init_multi.o bn_mp_clear_multi.o bn_prime_sizes_tab.o bn_mp_exteuclid.o bn_mp_toradix_n.o \ | 63 bn_mp_init_multi.o bn_mp_clear_multi.o bn_mp_exteuclid.o bn_mp_toradix_n.o \ |
61 bn_mp_prime_random_ex.o bn_mp_get_int.o bn_mp_sqrt.o bn_mp_is_square.o bn_mp_init_set.o \ | 64 bn_mp_prime_random_ex.o bn_mp_get_int.o bn_mp_sqrt.o bn_mp_is_square.o bn_mp_init_set.o \ |
62 bn_mp_init_set_int.o | 65 bn_mp_init_set_int.o bn_mp_invmod_slow.o bn_mp_prime_rabin_miller_trials.o |
63 | 66 |
64 libtommath.a: $(OBJECTS) | 67 libtommath.a: $(OBJECTS) |
65 $(AR) $(ARFLAGS) libtommath.a $(OBJECTS) | 68 $(AR) $(ARFLAGS) libtommath.a $(OBJECTS) |
66 $(RANLIB) libtommath.a | 69 $(RANLIB) libtommath.a |
70 | |
71 | |
72 #make a profiled library (takes a while!!!) | |
73 # | |
74 # This will build the library with profile generation | |
75 # then run the test demo and rebuild the library. | |
76 # | |
77 # So far I've seen improvements in the MP math | |
78 profiled: | |
79 make CFLAGS="$(CFLAGS) -fprofile-arcs -DTESTING" timing | |
80 ./ltmtest | |
81 rm -f *.a *.o ltmtest | |
82 make CFLAGS="$(CFLAGS) -fbranch-probabilities" | |
83 | |
84 #make a single object profiled library | |
85 profiled_single: | |
86 perl gen.pl | |
87 $(CC) $(CFLAGS) -fprofile-arcs -DTESTING -c mpi.c -o mpi.o | |
88 $(CC) $(CFLAGS) -DTESTING -DTIMER demo/timing.c mpi.o -o ltmtest | |
89 ./ltmtest | |
90 rm -f *.o ltmtest | |
91 $(CC) $(CFLAGS) -fbranch-probabilities -DTESTING -c mpi.c -o mpi.o | |
92 $(AR) $(ARFLAGS) libtommath.a mpi.o | |
93 ranlib libtommath.a | |
67 | 94 |
68 install: libtommath.a | 95 install: libtommath.a |
69 install -d -g root -o root $(DESTDIR)$(LIBPATH) | 96 install -d -g root -o root $(DESTDIR)$(LIBPATH) |
70 install -d -g root -o root $(DESTDIR)$(INCPATH) | 97 install -d -g root -o root $(DESTDIR)$(INCPATH) |
71 install -g root -o root $(LIBNAME) $(DESTDIR)$(LIBPATH) | 98 install -g root -o root $(LIBNAME) $(DESTDIR)$(LIBPATH) |
76 | 103 |
77 mtest: test | 104 mtest: test |
78 cd mtest ; $(CC) $(CFLAGS) mtest.c -o mtest -s | 105 cd mtest ; $(CC) $(CFLAGS) mtest.c -o mtest -s |
79 | 106 |
80 timing: libtommath.a | 107 timing: libtommath.a |
81 $(CC) $(CFLAGS) -DTIMER demo/demo.c libtommath.a -o ltmtest -s | 108 $(CC) $(CFLAGS) -DTIMER demo/timing.c libtommath.a -o ltmtest -s |
82 | 109 |
83 # makes the LTM book DVI file, requires tetex, perl and makeindex [part of tetex I think] | 110 # makes the LTM book DVI file, requires tetex, perl and makeindex [part of tetex I think] |
84 docdvi: tommath.src | 111 docdvi: tommath.src |
85 cd pics ; make | 112 cd pics ; make |
86 echo "hello" > tommath.ind | 113 echo "hello" > tommath.ind |
111 | 138 |
112 #LTM user manual [pdf] | 139 #LTM user manual [pdf] |
113 manual: mandvi | 140 manual: mandvi |
114 pdflatex bn >/dev/null | 141 pdflatex bn >/dev/null |
115 rm -f bn.aux bn.dvi bn.log bn.idx bn.lof bn.out bn.toc | 142 rm -f bn.aux bn.dvi bn.log bn.idx bn.lof bn.out bn.toc |
116 | 143 |
144 pretty: | |
145 perl pretty.build | |
146 | |
117 clean: | 147 clean: |
118 -rm -f *.bat *.pdf *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \ | 148 -rm -f *.bat *.pdf *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \ |
119 *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c | 149 *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex `find -type f | grep [~] | xargs` *.lo *.la |
150 -rm -rf .libs | |
120 -cd etc && make clean | 151 -cd etc && make clean |
121 -cd pics && make clean | 152 -cd pics && make clean |
122 | 153 |
123 zipup: clean manual poster docs | 154 zipup: clean manual poster docs |
124 perl gen.pl ; mv mpi.c pre_gen/ ; \ | 155 perl gen.pl ; mv mpi.c pre_gen/ ; \ |