Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. all: pedersen scalarmul varscalarmul verifenc ratchetcommit
  2. LIBSNARK=libsnark
  3. DEFINES=-UBINARY_OUTPUT -DBN_SUPPORT_SNARK=1 -DCURVE_BN128 -UMONTGOMERY_OUTPUT -DUSE_ASM
  4. CXXFLAGS=$(DEFINES) -I$(LIBSNARK) -I$(LIBSNARK)/depends/libfqfft -I$(LIBSNARK)/depends/libff -std=c++11 -Wall -Wextra -Wfatal-errors -pthread -ggdb3 -O2 -march=native -mtune=native -O2 -g -DNDEBUG
  5. LDFLAGS=-L$(LIBSNARK)/build -L$(LIBSNARK)/build/libsnark -L$(LIBSNARK)/build/depends -L$(LIBSNARK)/build/depends/libff/libff -lsnark -lff -lzm -lgmp -lgmpxx -lprocps
  6. pedersen: pedersen.cpp ecgadget.hpp libsnark_headers.hpp.gch pedersen.hpp.gch
  7. g++ $(CXXFLAGS) -o pedersen pedersen.cpp $(LDFLAGS)
  8. scalarmul: scalarmul.cpp ecgadget.hpp libsnark_headers.hpp.gch scalarmul.hpp.gch
  9. g++ $(CXXFLAGS) -o scalarmul scalarmul.cpp $(LDFLAGS)
  10. varscalarmul: varscalarmul.cpp ecgadget.hpp libsnark_headers.hpp.gch scalarmul.hpp.gch
  11. g++ $(CXXFLAGS) -o varscalarmul varscalarmul.cpp $(LDFLAGS)
  12. verifenc: verifenc.cpp ecgadget.hpp libsnark_headers.hpp.gch scalarmul.hpp.gch
  13. g++ $(CXXFLAGS) -o verifenc verifenc.cpp $(LDFLAGS)
  14. ratchetcommit: ratchetcommit.cpp ecgadget.hpp libsnark_headers.hpp.gch scalarmul.hpp.gch
  15. g++ $(CXXFLAGS) -o ratchetcommit ratchetcommit.cpp $(LDFLAGS)
  16. libsnark_headers.hpp.gch: libsnark_headers.hpp
  17. g++ $(CXXFLAGS) $<
  18. pedersen.hpp.gch: pedersen.hpp
  19. g++ $(CXXFLAGS) $<
  20. scalarmul.hpp.gch: scalarmul.hpp
  21. g++ $(CXXFLAGS) $<