makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. CFLAGS += -Wall -W -Wshadow -O3 -fomit-frame-pointer -funroll-loops -I../
  2. # default lib name (requires install with root)
  3. # LIBNAME=-ltommath
  4. # libname when you can't install the lib with install
  5. LIBNAME=../libtommath.a
  6. #provable primes
  7. pprime: pprime.o
  8. $(CC) pprime.o $(LIBNAME) -o pprime
  9. # portable [well requires clock()] tuning app
  10. tune: tune.o
  11. $(CC) tune.o $(LIBNAME) -o tune
  12. # same app but using RDTSC for higher precision [requires 80586+], coff based gcc installs [e.g. ming, cygwin, djgpp]
  13. tune86: tune.c
  14. nasm -f coff timer.asm
  15. $(CC) -DX86_TIMER $(CFLAGS) tune.c timer.o $(LIBNAME) -o tune86
  16. # for cygwin
  17. tune86c: tune.c
  18. nasm -f gnuwin32 timer.asm
  19. $(CC) -DX86_TIMER $(CFLAGS) tune.c timer.o $(LIBNAME) -o tune86
  20. #make tune86 for linux or any ELF format
  21. tune86l: tune.c
  22. nasm -f elf -DUSE_ELF timer.asm
  23. $(CC) -DX86_TIMER $(CFLAGS) tune.c timer.o $(LIBNAME) -o tune86l
  24. # spits out mersenne primes
  25. mersenne: mersenne.o
  26. $(CC) mersenne.o $(LIBNAME) -o mersenne
  27. # fines DR safe primes for the given config
  28. drprime: drprime.o
  29. $(CC) drprime.o $(LIBNAME) -o drprime
  30. # fines 2k safe primes for the given config
  31. 2kprime: 2kprime.o
  32. $(CC) 2kprime.o $(LIBNAME) -o 2kprime
  33. mont: mont.o
  34. $(CC) mont.o $(LIBNAME) -o mont
  35. clean:
  36. rm -f *.log *.o *.obj *.exe pprime tune mersenne drprime tune86 tune86l mont 2kprime pprime.dat \
  37. *.da *.dyn *.dpi *~