ROOT = . OPTIM= -O3 #PROF = -pg #DEBUG = -DDEBUG #MEMPROTECT = -DMEMPROTECT # set this to your preferred local storage directory PREP_DIR = '-DPREP_DIR="Player-Data/"' # set for SHE preprocessing (SPDZ and Overdrive) USE_NTL = 0 # set for using GF(2^128) online phase, OT, MASCOT, or BMR # unset for GF(2^40) online and offline phase USE_GF2N_LONG = 1 # set to -march= for optimization # AVX2 support (Haswell or later) changes the bit matrix transpose ARCH = -mtune=native -mavx #use CONFIG.mine to overwrite DIR settings -include CONFIG.mine ifeq ($(USE_GF2N_LONG),1) GF2N_LONG = -DUSE_GF2N_LONG endif # MAX_MOD_SZ must be at least ceil(len(p)/len(word)) # Default is 2, which suffices for 128-bit p # MOD = -DMAX_MOD_SZ=2 LDLIBS = -lmpirxx -lmpir -lsodium $(MY_LDLIBS) -lm -lpthread LDLIBS += -lboost_system -lssl -lcrypto ifeq ($(USE_NTL),1) LDLIBS := -lntl $(LDLIBS) endif OS := $(shell uname -s) ifeq ($(OS), Linux) LDLIBS += -lrt endif BOOST = -lboost_system -lboost_thread $(MY_BOOST) CXX = g++ -no-pie #CXX = clang++ CFLAGS += $(ARCH) $(MY_CFLAGS) -g -Wextra -Wall $(OPTIM) -I$(ROOT) -pthread $(PROF) $(DEBUG) $(MOD) $(MEMPROTECT) $(GF2N_LONG) $(PREP_DIR) -maes -mpclmul -msse4.1 -mavx -mavx2 -mbmi2 --std=c++11 -Werror CPPFLAGS = $(CFLAGS) LD = $(CXX)