summaryrefslogtreecommitdiffhomepage
path: root/libtommath/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'libtommath/Makefile.in')
-rw-r--r--libtommath/Makefile.in67
1 files changed, 45 insertions, 22 deletions
diff --git a/libtommath/Makefile.in b/libtommath/Makefile.in
index e96173a..961b92a 100644
--- a/libtommath/Makefile.in
+++ b/libtommath/Makefile.in
@@ -3,7 +3,7 @@
#Tom St Denis
#version of library
-VERSION=0.35
+VERSION=0.40
VPATH=@srcdir@
srcdir=@srcdir@
@@ -13,6 +13,8 @@ CFLAGS += -I$(srcdir)
#CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare
+ifndef IGNORE_SPEED
+
#for speed
#CFLAGS += -O3 -funroll-all-loops
@@ -25,14 +27,28 @@ CFLAGS += -I$(srcdir)
#debug
#CFLAGS += -g3
-#install as this user
-USER=root
-GROUP=root
+endif
-default: libtommath.a
+#install as this user
+ifndef INSTALL_GROUP
+ GROUP=wheel
+else
+ GROUP=$(INSTALL_GROUP)
+endif
+
+ifndef INSTALL_USER
+ USER=root
+else
+ USER=$(INSTALL_USER)
+endif
#default files to install
-LIBNAME=libtommath.a
+ifndef LIBNAME
+ LIBNAME=libtommath.a
+endif
+
+default: ${LIBNAME}
+
HEADERS=tommath.h tommath_class.h tommath_superclass.h
#LIBPATH-The directory for libtommath to be installed to.
@@ -71,9 +87,9 @@ bn_mp_prime_random_ex.o bn_mp_get_int.o bn_mp_sqrt.o bn_mp_is_square.o bn_mp_ini
bn_mp_init_set_int.o bn_mp_invmod_slow.o bn_mp_prime_rabin_miller_trials.o \
bn_mp_to_signed_bin_n.o bn_mp_to_unsigned_bin_n.o
-libtommath.a: $(OBJECTS)
- $(AR) $(ARFLAGS) libtommath.a $(OBJECTS)
- $(RANLIB) libtommath.a
+$(LIBNAME): $(OBJECTS)
+ $(AR) $(ARFLAGS) $@ $(OBJECTS)
+ $(RANLIB) $@
#make a profiled library (takes a while!!!)
#
@@ -95,27 +111,27 @@ profiled_single:
./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
+ $(AR) $(ARFLAGS) $(LIBNAME) mpi.o
+ $(RANLIB) $(LIBNAME)
-install: libtommath.a
+install: $(LIBNAME)
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH)
install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
-test: libtommath.a demo/demo.o
- $(CC) $(CFLAGS) demo/demo.o libtommath.a -o test
+test: $(LIBNAME) demo/demo.o
+ $(CC) $(CFLAGS) demo/demo.o $(LIBNAME) -o test
mtest: test
cd mtest ; $(CC) $(CFLAGS) mtest.c -o mtest
-timing: libtommath.a
- $(CC) $(CFLAGS) -DTIMER demo/timing.c libtommath.a -o ltmtest
+timing: $(LIBNAME)
+ $(CC) $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME) -o ltmtest
# makes the LTM book DVI file, requires tetex, perl and makeindex [part of tetex I think]
docdvi: tommath.src
- cd pics ; make
+ cd pics ; MAKE=${MAKE} ${MAKE}
echo "hello" > tommath.ind
perl booker.pl
latex tommath > /dev/null
@@ -132,7 +148,7 @@ poster: poster.tex
docs: docdvi
dvipdf tommath
rm -f tommath.log tommath.aux tommath.dvi tommath.idx tommath.toc tommath.lof tommath.ind tommath.ilg
- cd pics ; make clean
+ cd pics ; MAKE=${MAKE} ${MAKE} clean
#LTM user manual
mandvi: bn.tex
@@ -152,14 +168,21 @@ pretty:
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 *.da *.dyn *.dpi tommath.tex *.lo *.la
+ *.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
+ cd etc ; MAKE=${MAKE} ${MAKE} clean
+ cd pics ; MAKE=${MAKE} ${MAKE} clean
+
+#zipup the project (take that!)
+no_oops: clean
+ cd .. ; cvs commit
+ echo Scanning for scratch/dirty files
+ find . -type f | grep -v CVS | xargs -n 1 bash mess.sh
zipup: clean manual poster docs
perl gen.pl ; mv mpi.c pre_gen/ ; \
cd .. ; rm -rf ltm* libtommath-$(VERSION) ; mkdir libtommath-$(VERSION) ; \
cp -R ./libtommath/* ./libtommath-$(VERSION)/ ; \
tar -c libtommath-$(VERSION)/* | bzip2 -9vvc > ltm-$(VERSION).tar.bz2 ; \
- zip -9 -r ltm-$(VERSION).zip libtommath-$(VERSION)/*
+ zip -9 -r ltm-$(VERSION).zip libtommath-$(VERSION)/* ; \
+ mv -f ltm* ~ ; rm -rf libtommath-$(VERSION)