Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # cudadl version 0.9: 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. LIBEVENT=/usr/local
  18. WORDS = 24
  19. CXXFLAGS=-g -Wall -O0 -DWORDS=$(WORDS) -I$(LIBEVENT)/include
  20. NVCCOPTS=-g -arch sm_20 --ptxas-options=-v -O2 -DWORDS=$(WORDS)
  21. NVCC=nvcc $(NVCCOPTS)
  22. CXXFILES = dlrho.cc gen_N.cc
  23. CUFILES = parrhoasm.cu dpstream.cu
  24. OFILES = dlrho.o gen_N.o cudadl.o controller.o evutils.o dpnode.o worker.o
  25. TARGETS = gen_N dlrho controller dpnode worker
  26. all: $(TARGETS)
  27. gen_N: gen_N.o
  28. g++ -g -Wall $^ -o $@ -lntl -lgmp
  29. dlrho: dlrho.o cudadl.o
  30. g++ -g -Wall $^ -o $@ -lntl -lgmp -L/usr/local/cuda/lib64 -lcudart
  31. dlrho.o: dlrho.cc
  32. g++ $(CXXFLAGS) -I /usr/local/cuda/include $^ -c -o $@
  33. cudadl.o: parrhoasm.cu cios.asm dpstream.cu
  34. $(NVCC) -c parrhoasm.cu -o cudadl.o
  35. cios.asm: gencios_reg_20
  36. ./gencios_reg_20 $(WORDS) > $@
  37. controller: controller.o evutils.o
  38. g++ -g -Wall $^ -o $@ -L$(LIBEVENT)/lib -levent -lntl -lgmp
  39. dpnode: dpnode.o evutils.o
  40. g++ -g -Wall $^ -o $@ -L$(LIBEVENT)/lib -levent -lntl -lgmp
  41. worker: worker.o evutils.o
  42. g++ -g -Wall $^ -o $@ -L$(LIBEVENT)/lib -levent -lntl -lgmp
  43. clean:
  44. -rm -f $(OFILES)
  45. veryclean: clean
  46. -rm -f $(TARGETS) cios.asm