Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. ## duoram
  2. # Copyright (C) 2020 duoram authors
  3. #
  4. # @file Makefile
  5. # @brief Makefile for compiling duoram
  6. #
  7. # @license GNU Public License (version 2); see LICENSE for full license text
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; either version 2 of the License, or
  12. # (at your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License along
  20. # with this program; if not, write to the Free Software Foundation, Inc.,
  21. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  22. CXX = g++
  23. CXXFLAGS = -g -march=native -std=c++17 -Wall -pedantic -fopenmp -O3 -Wno-ignored-attributes -pthread
  24. LIBS = -lbsd
  25. FLAGS = -DBOOST_ERROR_CODE_HEADER_ONLY -DThreeParty
  26. DEBUGFLAGS = -DBOOST_ERROR_CODE_HEADER_ONLY -DThreeParty -DDEBUG -DVERBOSE
  27. TWOFLAGS = -DBOOST_ERROR_CODE_HEADER_ONLY
  28. all: duoram0 duoram1 p2 debugp2 debugduoram1 debugduoram0 2Pduoram1 2Pduoram0
  29. p2: p2.cpp duoram-utils.h duoram-read.h duoram-write.h duoram-refresh.h readvectors.h
  30. $(CXX) $(CXXFLAGS) -o p2 p2.cpp $(LIBS) $(FLAGS) -I.
  31. duoram1: duoram.cpp duoram-utils.h duoram-read.h duoram-write.h duoram-refresh.h readvectors.h
  32. $(CXX) $(CXXFLAGS) -o duoram1 duoram.cpp $(LIBS) $(FLAGS) -DPARTY=1 -I.
  33. duoram0: duoram.cpp duoram-utils.h duoram-read.h duoram-write.h duoram-refresh.h readvectors.h
  34. $(CXX) $(CXXFLAGS) -o duoram0 duoram.cpp $(LIBS) $(FLAGS) -DPARTY=0 -I.
  35. debugp2: p2.cpp duoram-utils.h duoram-read.h duoram-write.h duoram-refresh.h readvectors.h
  36. $(CXX) $(CXXFLAGS) -o debugp2 p2.cpp $(LIBS) $(DEBUGFLAGS) -I.
  37. debugduoram1: duoram.cpp duoram-utils.h duoram-read.h duoram-write.h duoram-refresh.h readvectors.h
  38. $(CXX) $(CXXFLAGS) -o debugduoram1 duoram.cpp $(LIBS) $(DEBUGFLAGS) -DPARTY=1 -I.
  39. debugduoram0: duoram.cpp duoram-utils.h duoram-read.h duoram-write.h duoram-refresh.h readvectors.h
  40. $(CXX) $(CXXFLAGS) -o debugduoram0 duoram.cpp $(LIBS) $(DEBUGFLAGS) -DPARTY=0 -I.
  41. 2Pduoram1: duoram.cpp duoram-utils.h duoram-read.h duoram-write.h duoram-refresh.h readvectors.h
  42. $(CXX) $(CXXFLAGS) -o 2Pduoram1 duoram.cpp $(LIBS) $(TWOFLAGS) -DPARTY=1 -I.
  43. 2Pduoram0: duoram.cpp duoram-utils.h duoram-read.h duoram-write.h duoram-refresh.h readvectors.h
  44. $(CXX) $(CXXFLAGS) -o 2Pduoram0 duoram.cpp $(LIBS) $(TWOFLAGS) -DPARTY=0 -I.
  45. clean:
  46. rm duoram0 duoram1 p2 debugp2 debugduoram1 debugduoram0 2Pduoram1 2Pduoram0
  47. docs:
  48. doxygen Doxyfile
  49. .PHONY: directories