diff --git a/Makefile b/src/Makefile similarity index 66% rename from Makefile rename to src/Makefile index e105ffe..4271aa8 100644 --- a/Makefile +++ b/src/Makefile @@ -1,10 +1,10 @@ -MP_SPDZ_PATH := src/MP-SPDZ +MP_SPDZ_PATH := $(CURDIR)/MP-SPDZ all: patch deps $(MAKE) -C $(MP_SPDZ_PATH) all patch: - -git -C $(MP_SPDZ_PATH) apply ../../config.patch + -git -C $(MP_SPDZ_PATH) apply $(CURDIR)/config.patch deps: patch sudo apt install automake build-essential clang cmake git libntl-dev \ @@ -12,8 +12,10 @@ deps: patch $(MAKE) -C $(MP_SPDZ_PATH) boost $(MAKE) -C $(MP_SPDZ_PATH) libote mpir -%.mpc: - cd $(MP_SPDZ_PATH) && ./compile.py ../$@ +%.mpc: _phony + python3 $(MP_SPDZ_PATH)/compile.py $@ %: $(MAKE) -C $(MP_SPDZ_PATH) $@ + +.PHONY: _phony diff --git a/config.patch b/src/config.patch similarity index 100% rename from config.patch rename to src/config.patch diff --git a/src/gale_shapley.mpc b/src/gale_shapley.mpc index 09e3d14..8d5ceb6 100644 --- a/src/gale_shapley.mpc +++ b/src/gale_shapley.mpc @@ -148,6 +148,6 @@ class Matchmaker: print('match', self.oram_type) -mm = Matchmaker(5, oram_type=OptimalORAM) +mm = Matchmaker(50, oram_type=OptimalORAM) mm.init_easy() mm.match() diff --git a/run.sh b/src/run.sh similarity index 76% rename from run.sh rename to src/run.sh index cc4cad3..f678cf9 100755 --- a/run.sh +++ b/src/run.sh @@ -2,5 +2,5 @@ MACHINE="$1" shift -cd src/MP-SPDZ +cd MP-SPDZ "./$MACHINE" "$@"