tommath/makefile

31 lines
824 B
Makefile
Raw Normal View History

2003-02-28 11:02:06 -05:00
CC = gcc
2003-02-28 11:07:58 -05:00
CFLAGS += -Wall -W -Wshadow -ansi -O3 -fomit-frame-pointer -funroll-loops
2003-02-28 11:02:06 -05:00
2003-02-28 11:07:58 -05:00
VERSION=0.11
2003-02-28 11:02:06 -05:00
default: test
2003-02-28 11:06:22 -05:00
test: bn.o demo.o
2003-02-28 11:02:06 -05:00
$(CC) bn.o demo.o -o demo
2003-02-28 11:07:58 -05:00
cd mtest ; gcc $(CFLAGS) mtest.c -o mtest -s
2003-02-28 11:02:06 -05:00
2003-02-28 11:06:22 -05:00
# builds the x86 demo
test86:
nasm -f coff timer.asm
$(CC) -DDEBUG -DTIMER_X86 $(CFLAGS) bn.c demo.c timer.o -o demo -s
2003-02-28 11:02:06 -05:00
docdvi: bn.tex
latex bn
docs: docdvi
pdflatex bn
rm -f bn.log bn.aux bn.dvi
clean:
2003-02-28 11:07:58 -05:00
rm -f *.pdf *.o *.exe demo mtest/mtest mtest/*.exe etc/*.exe bn.log bn.aux bn.dvi *.log *.s etc/pprime etc/mersenne
2003-02-28 11:02:06 -05:00
zipup: clean docs
2003-02-28 11:07:58 -05:00
cd .. ; rm -rf ltm* libtommath-$(VERSION) ; mkdir libtommath-$(VERSION) ; \
2003-02-28 11:02:06 -05:00
cp -R ./libtommath/* ./libtommath-$(VERSION)/ ; tar -c libtommath-$(VERSION)/* > ltm-$(VERSION).tar ; \
2003-02-28 11:07:58 -05:00
bzip2 -9vv ltm-$(VERSION).tar ; zip -9 -r ltm-$(VERSION).zip libtommath-$(VERSION)/*