Makefile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # cudadl version 0.8: Compute discrete logs in smooth group orders
  2. # using CUDA
  3. # Copyright (C) 2012 by Ryan Henry and Ian Goldberg
  4. # {rhenry,iang}@cs.uwaterloo.ca
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of version 3 of the GNU General Public License as
  8. # published by the Free Software Foundation.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. CXXFLAGS=-g -Wall -O2
  18. NVCCOPTS=-g -arch sm_20 --ptxas-options=-v -O2
  19. NVCC=nvcc $(NVCCOPTS)
  20. CXXFILES = dlrho.cc gen_N.cc
  21. CUFILES = parrhoasm.cu dpstream.cu
  22. OFILES = dlrho.o gen_N.o cudadl.o
  23. TARGETS = gen_N dlrho
  24. WORDS = 24
  25. all: $(TARGETS)
  26. gen_N: gen_N.o
  27. g++ -g -Wall $^ -o $@ -lntl -lgmp
  28. dlrho: dlrho.o cudadl.o
  29. g++ -g -Wall $^ -o $@ -lntl -lgmp -L/usr/local/cuda/lib64 -lcudart
  30. dlrho.o: dlrho.cc
  31. g++ $(CXXFLAGS) -I /usr/local/cuda/include $^ -c -o $@
  32. cudadl.o: parrhoasm.cu cios.asm dpstream.cu
  33. $(NVCC) -c parrhoasm.cu -DWORDS=$(WORDS) -o cudadl.o
  34. cios.asm: gencios_reg_20
  35. ./gencios_reg_20 $(WORDS) > $@
  36. clean:
  37. -rm -f $(OFILES)
  38. veryclean: clean
  39. -rm -f $(TARGETS) cios.asm