2003-02-28 11:09:08 -05: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 11:08:34 -05:00
|
|
|
|
2003-05-17 08:33:54 -04:00
|
|
|
#provable primes
|
2003-02-28 11:08:34 -05:00
|
|
|
pprime: pprime.o
|
2003-02-28 11:09:08 -05:00
|
|
|
$(CC) pprime.o $(LIBNAME) -o pprime
|
2003-02-28 11:08:34 -05:00
|
|
|
|
2003-05-17 08:33:54 -04:00
|
|
|
# portable [well requires clock()] tuning app
|
2003-02-28 11:08:34 -05:00
|
|
|
tune: tune.o
|
2003-02-28 11:09:08 -05:00
|
|
|
$(CC) tune.o $(LIBNAME) -o tune
|
2003-05-17 08:33:54 -04: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
|
|
|
|
|
2003-12-24 13:59:22 -05:00
|
|
|
# for cygwin
|
|
|
|
tune86c: tune.c
|
|
|
|
nasm -f gnuwin32 timer.asm
|
|
|
|
$(CC) -DX86_TIMER $(CFLAGS) tune.c timer.o $(LIBNAME) -o tune86
|
|
|
|
|
2003-05-17 08:33:54 -04:00
|
|
|
#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 11:08:34 -05:00
|
|
|
|
2003-05-17 08:33:54 -04:00
|
|
|
# spits out mersenne primes
|
2003-02-28 11:08:34 -05:00
|
|
|
mersenne: mersenne.o
|
2003-02-28 11:09:08 -05:00
|
|
|
$(CC) mersenne.o $(LIBNAME) -o mersenne
|
2003-03-22 10:10:20 -05:00
|
|
|
|
2003-05-17 08:33:54 -04:00
|
|
|
# fines DR safe primes for the given config
|
2003-03-22 10:10:20 -05:00
|
|
|
drprime: drprime.o
|
|
|
|
$(CC) drprime.o $(LIBNAME) -o drprime
|
2003-05-17 08:33:54 -04:00
|
|
|
|
2003-05-29 09:35:26 -04:00
|
|
|
# fines 2k safe primes for the given config
|
|
|
|
2kprime: 2kprime.o
|
|
|
|
$(CC) 2kprime.o $(LIBNAME) -o 2kprime
|
|
|
|
|
2003-05-17 08:33:54 -04:00
|
|
|
mont: mont.o
|
|
|
|
$(CC) mont.o $(LIBNAME) -o mont
|
|
|
|
|
2003-02-28 11:08:34 -05:00
|
|
|
|
|
|
|
clean:
|
2004-08-09 18:15:59 -04:00
|
|
|
rm -f *.log *.o *.obj *.exe pprime tune mersenne drprime tune86 tune86l mont 2kprime pprime.dat \
|
|
|
|
*.da *.dyn *.dpi *~
|