2019-05-04 16:57:07 +00:00
|
|
|
CFLAGS += -Wall -W -Wextra -Wshadow -O3 -I../
|
2003-02-28 16:09:08 +00:00
|
|
|
|
|
|
|
# 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
|
2019-05-04 16:57:07 +00:00
|
|
|
$(CC) $(CFLAGS) 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
|
2019-05-04 16:57:07 +00:00
|
|
|
$(CC) $(CFLAGS) tune.o $(LIBNAME) -o tune
|
2019-05-07 09:55:43 +00:00
|
|
|
./tune_it.sh
|
2019-05-04 16:57:07 +00:00
|
|
|
|
|
|
|
test_standalone: tune.o
|
|
|
|
# The benchmark program works as a testtool, too
|
|
|
|
$(CC) $(CFLAGS) tune.o $(LIBNAME) -o test
|
2019-05-07 09:55:43 +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
|
2019-05-04 16:57:07 +00:00
|
|
|
$(CC) $(CFLAGS) mersenne.o $(LIBNAME) -o mersenne
|
2003-03-22 15:10:20 +00:00
|
|
|
|
2019-05-04 16:57:07 +00:00
|
|
|
# finds DR safe primes for the given config
|
2003-03-22 15:10:20 +00:00
|
|
|
drprime: drprime.o
|
2019-05-04 16:57:07 +00:00
|
|
|
$(CC) $(CFLAGS) drprime.o $(LIBNAME) -o drprime
|
2019-05-07 09:55:43 +00:00
|
|
|
|
2019-05-04 16:57:07 +00:00
|
|
|
# finds 2k safe primes for the given config
|
2003-05-29 13:35:26 +00:00
|
|
|
2kprime: 2kprime.o
|
2019-05-04 16:57:07 +00:00
|
|
|
$(CC) $(CFLAGS) 2kprime.o $(LIBNAME) -o 2kprime
|
2003-05-29 13:35:26 +00:00
|
|
|
|
2003-05-17 12:33:54 +00:00
|
|
|
mont: mont.o
|
2019-05-04 16:57:07 +00:00
|
|
|
$(CC) $(CFLAGS) mont.o $(LIBNAME) -o mont
|
2003-05-17 12:33:54 +00:00
|
|
|
|
2019-05-07 09:55:43 +00:00
|
|
|
|
2003-02-28 16:08:34 +00:00
|
|
|
clean:
|
2019-05-04 16:57:07 +00:00
|
|
|
rm -f *.log *.o *.obj *.exe pprime tune mersenne drprime mont 2kprime pprime.dat \
|
|
|
|
tuning_list multiplying squaring test *.da *.dyn *.dpi *~
|
|
|
|
|