The unified diff between revisions [40ab3795..] and [66d004ad..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'Makefile.in'
#
#
# patch "Makefile.in"
# from [699792a85f9324d650e3ce0b66c89818912d07b5]
# to [e5a7155ca2d337d40c64a637035b4fc17f1cb30b]
#
============================================================
--- Makefile.in 699792a85f9324d650e3ce0b66c89818912d07b5
+++ Makefile.in e5a7155ca2d337d40c64a637035b4fc17f1cb30b
@@ -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
@@ -26,13 +28,25 @@ CFLAGS += -I$(srcdir)
#CFLAGS += -g3
#install as this user
-USER=root
-GROUP=root
+ifndef INSTALL_GROUP
+ GROUP=wheel
+else
+ GROUP=$(INSTALL_GROUP)
+endif
-default: libtommath.a
+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 +85,9 @@ bn_mp_to_signed_bin_n.o bn_mp_to_unsigne
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 +109,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 +146,7 @@ docs: docdvi
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 +166,21 @@ clean:
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)/* ; \
+ mv -f ltm* ~ ; rm -rf libtommath-$(VERSION)
- zip -9 -r ltm-$(VERSION).zip libtommath-$(VERSION)/*