Mercurial > dropbear
diff 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 |
line wrap: on
line diff
--- a/Makefile.in Sun Dec 19 15:57:19 2004 +0000 +++ b/Makefile.in Sun Dec 19 16:18:40 2004 +0000 @@ -19,7 +19,10 @@ #x86 optimizations [should be valid for any GCC install though] #CFLAGS += -fomit-frame-pointer -VERSION=0.30 +#debug +#CFLAGS += -g3 + +VERSION=0.32 default: libtommath.a @@ -27,7 +30,7 @@ LIBNAME=libtommath.a HEADERS=tommath.h -#LIBPATH-The directory for libtomcrypt to be installed to. +#LIBPATH-The directory for libtommath to be installed to. #INCPATH-The directory to install the header files for libtommath. #DATAPATH-The directory to install the pdf docs. DESTDIR= @@ -57,14 +60,38 @@ bn_mp_reduce_2k.o bn_mp_reduce_is_2k.o bn_mp_reduce_2k_setup.o \ bn_mp_radix_smap.o bn_mp_read_radix.o bn_mp_toradix.o bn_mp_radix_size.o \ bn_mp_fread.o bn_mp_fwrite.o bn_mp_cnt_lsb.o bn_error.o \ -bn_mp_init_multi.o bn_mp_clear_multi.o bn_prime_sizes_tab.o bn_mp_exteuclid.o bn_mp_toradix_n.o \ +bn_mp_init_multi.o bn_mp_clear_multi.o bn_mp_exteuclid.o bn_mp_toradix_n.o \ 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 \ -bn_mp_init_set_int.o +bn_mp_init_set_int.o bn_mp_invmod_slow.o bn_mp_prime_rabin_miller_trials.o libtommath.a: $(OBJECTS) $(AR) $(ARFLAGS) libtommath.a $(OBJECTS) $(RANLIB) libtommath.a + +#make a profiled library (takes a while!!!) +# +# This will build the library with profile generation +# then run the test demo and rebuild the library. +# +# So far I've seen improvements in the MP math +profiled: + make CFLAGS="$(CFLAGS) -fprofile-arcs -DTESTING" timing + ./ltmtest + rm -f *.a *.o ltmtest + make CFLAGS="$(CFLAGS) -fbranch-probabilities" + +#make a single object profiled library +profiled_single: + perl gen.pl + $(CC) $(CFLAGS) -fprofile-arcs -DTESTING -c mpi.c -o mpi.o + $(CC) $(CFLAGS) -DTESTING -DTIMER demo/timing.c mpi.o -o ltmtest + ./ltmtest + rm -f *.o ltmtest + $(CC) $(CFLAGS) -fbranch-probabilities -DTESTING -c mpi.c -o mpi.o + $(AR) $(ARFLAGS) libtommath.a mpi.o + ranlib libtommath.a + install: libtommath.a install -d -g root -o root $(DESTDIR)$(LIBPATH) install -d -g root -o root $(DESTDIR)$(INCPATH) @@ -78,7 +105,7 @@ cd mtest ; $(CC) $(CFLAGS) mtest.c -o mtest -s timing: libtommath.a - $(CC) $(CFLAGS) -DTIMER demo/demo.c libtommath.a -o ltmtest -s + $(CC) $(CFLAGS) -DTIMER demo/timing.c libtommath.a -o ltmtest -s # makes the LTM book DVI file, requires tetex, perl and makeindex [part of tetex I think] docdvi: tommath.src @@ -113,10 +140,14 @@ manual: mandvi pdflatex bn >/dev/null rm -f bn.aux bn.dvi bn.log bn.idx bn.lof bn.out bn.toc - + +pretty: + perl pretty.build + clean: -rm -f *.bat *.pdf *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \ - *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c + *.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 + -rm -rf .libs -cd etc && make clean -cd pics && make clean