libtommath/etc/makefile

40 lines
1.1 KiB
Makefile
Raw Normal View History

2003-02-28 16:09:08 +00:00
CFLAGS += -Wall -W -Wshadow -O3 -fomit-frame-pointer -funroll-loops -I../
# default lib name (requires install with root)
# LIBNAME=-ltommath
# libname when you can't install the lib with install
LIBNAME=../libtommath.a
2003-02-28 16:08:34 +00:00
2003-05-17 12:33:54 +00:00
#provable primes
2003-02-28 16:08:34 +00:00
pprime: pprime.o
2003-02-28 16:09:08 +00:00
$(CC) pprime.o $(LIBNAME) -o pprime
2003-02-28 16:08:34 +00:00
2003-05-17 12:33:54 +00:00
# portable [well requires clock()] tuning app
2003-02-28 16:08:34 +00:00
tune: tune.o
2003-02-28 16:09:08 +00:00
$(CC) tune.o $(LIBNAME) -o tune
2003-05-17 12:33:54 +00:00
# same app but using RDTSC for higher precision [requires 80586+], coff based gcc installs [e.g. ming, cygwin, djgpp]
tune86: tune.c
nasm -f coff timer.asm
$(CC) -DX86_TIMER $(CFLAGS) tune.c timer.o $(LIBNAME) -o tune86
#make tune86 for linux or any ELF format
tune86l: tune.c
nasm -f elf -DUSE_ELF timer.asm
$(CC) -DX86_TIMER $(CFLAGS) tune.c timer.o $(LIBNAME) -o tune86l
2003-02-28 16:08:34 +00:00
2003-05-17 12:33:54 +00:00
# spits out mersenne primes
2003-02-28 16:08:34 +00:00
mersenne: mersenne.o
2003-02-28 16:09:08 +00:00
$(CC) mersenne.o $(LIBNAME) -o mersenne
2003-03-22 15:10:20 +00:00
2003-05-17 12:33:54 +00:00
# fines DR safe primes for the given config
2003-03-22 15:10:20 +00:00
drprime: drprime.o
$(CC) drprime.o $(LIBNAME) -o drprime
2003-05-17 12:33:54 +00:00
mont: mont.o
$(CC) mont.o $(LIBNAME) -o mont
2003-02-28 16:08:34 +00:00
clean:
2003-05-17 12:33:54 +00:00
rm -f *.log *.o *.obj *.exe pprime tune mersenne drprime tune86 tune86l mont