diff --git a/.gitmodules b/.gitmodules index 454cb766b..d8e0ccfa6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "lib/sectorbuilder"] - path = lib/sectorbuilder - url = https://github.com/filecoin-project/go-sectorbuilder.git [submodule "extern/go-bls-sigs"] path = extern/go-bls-sigs url = https://github.com/filecoin-project/go-bls-sigs.git +[submodule "extern/go-sectorbuilder"] + path = extern/go-sectorbuilder + url = https://github.com/filecoin-project/go-sectorbuilder diff --git a/Makefile b/Makefile index d6ab4e261..62f27ac94 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,6 @@ all: build .PHONY: all -BUILD_DEPS+=lib/sectorbuilder/include/sector_builder_ffi.h # git modules that need to be loaded MODULES:= @@ -22,13 +21,20 @@ MODULES+=$(BLS_PATH) BUILD_DEPS+=build/.bls-install CLEAN+=build/.bls-install +SECTOR_BUILDER_PATH:=extern/go-sectorbuilder/ +SECTOR_BUILDER_DEPS:=libsector_builder_ffi.a sector_builder_ffi.pc sector_builder_ffi.h +SECTOR_BUILDER_DEPS:=$(addprefix $(SECTOR_BUILDER_PATH),$(SECTOR_BUILDER_DEPS)) -lib/sectorbuilder/include/sector_builder_ffi.h: lib/sectorbuilder lib/sectorbuilder/rust-fil-sector-builder - ./lib/sectorbuilder/build.sh +$(SECTOR_BUILDER_DEPS): build/.sector-builder-install ; + +build/.sector-builder-install: $(SECTOR_BUILDER_PATH) + $(MAKE) -C $(SECTOR_BUILDER_PATH) $(SECTOR_BUILDER_DEPS:$(SECTOR_BUILDER_PATH)%=%) @touch $@ -MODULES+=lib/sectorbuilder -MODULES+=lib/sectorbuilder/rust-fil-sector-builder +MODULES+=$(SECTOR_BUILDER_PATH) +BUILD_DEPS+=build/.sector-builder-install +CLEAN+=build/.sector-builder-install + $(MODULES): build/.update-modules ; diff --git a/extern/go-sectorbuilder b/extern/go-sectorbuilder new file mode 160000 index 000000000..9b090e700 --- /dev/null +++ b/extern/go-sectorbuilder @@ -0,0 +1 @@ +Subproject commit 9b090e700325b1c9a7d3b1556d447897ae039a58 diff --git a/go.mod b/go.mod index 972b11a55..399d591fb 100644 --- a/go.mod +++ b/go.mod @@ -7,6 +7,7 @@ require ( github.com/BurntSushi/toml v0.3.1 github.com/filecoin-project/go-bls-sigs v0.0.0-20190718224239-4bc4b8a7bbf8 github.com/filecoin-project/go-leb128 v0.0.0-20190212224330-8d79a5489543 + github.com/filecoin-project/go-sectorbuilder v0.0.0-20190725115349-9b090e700325 github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 github.com/gorilla/websocket v1.4.0 github.com/ipfs/go-bitswap v0.1.5 @@ -80,3 +81,5 @@ require ( ) replace github.com/filecoin-project/go-bls-sigs => ./extern/go-bls-sigs + +replace github.com/filecoin-project/go-sectorbuilder => ./extern/go-sectorbuilder diff --git a/lib/sectorbuilder b/lib/sectorbuilder deleted file mode 160000 index ff9bb8955..000000000 --- a/lib/sectorbuilder +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ff9bb895529ff49f019b69bcb2527df0479b3632