2019-07-08 15:02:03 +00:00
|
|
|
all: build
|
2019-07-17 11:42:49 +00:00
|
|
|
.PHONY: all
|
2019-07-08 15:02:03 +00:00
|
|
|
|
|
|
|
|
2019-07-17 11:42:49 +00:00
|
|
|
# git modules that need to be loaded
|
|
|
|
MODULES:=
|
|
|
|
|
2019-07-19 11:56:18 +00:00
|
|
|
CLEAN:=
|
|
|
|
|
2019-08-28 16:14:32 +00:00
|
|
|
## BLS
|
|
|
|
|
2019-07-19 11:56:18 +00:00
|
|
|
BLS_PATH:=extern/go-bls-sigs/
|
|
|
|
BLS_DEPS:=libbls_signatures.a libbls_signatures.pc libbls_signatures.h
|
|
|
|
BLS_DEPS:=$(addprefix $(BLS_PATH),$(BLS_DEPS))
|
|
|
|
|
|
|
|
$(BLS_DEPS): build/.bls-install ;
|
|
|
|
|
|
|
|
build/.bls-install: $(BLS_PATH)
|
|
|
|
$(MAKE) -C $(BLS_PATH) $(BLS_DEPS:$(BLS_PATH)%=%)
|
2019-07-17 11:42:49 +00:00
|
|
|
@touch $@
|
|
|
|
|
2019-07-19 11:56:18 +00:00
|
|
|
MODULES+=$(BLS_PATH)
|
|
|
|
BUILD_DEPS+=build/.bls-install
|
|
|
|
CLEAN+=build/.bls-install
|
2019-07-08 11:00:52 +00:00
|
|
|
|
2019-08-28 16:14:32 +00:00
|
|
|
## SECTOR BUILDER
|
|
|
|
|
2019-07-26 22:25:53 +00:00
|
|
|
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))
|
2019-07-16 15:14:16 +00:00
|
|
|
|
2019-07-26 22:25:53 +00:00
|
|
|
$(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)%=%)
|
2019-07-17 11:42:49 +00:00
|
|
|
@touch $@
|
|
|
|
|
2019-07-26 22:25:53 +00:00
|
|
|
MODULES+=$(SECTOR_BUILDER_PATH)
|
|
|
|
BUILD_DEPS+=build/.sector-builder-install
|
|
|
|
CLEAN+=build/.sector-builder-install
|
|
|
|
|
2019-09-04 09:49:22 +00:00
|
|
|
$(MODULES): build/.update-modules ;
|
2019-08-28 16:14:32 +00:00
|
|
|
|
2019-09-04 09:49:22 +00:00
|
|
|
# dummy file that marks the last time modules were updated
|
|
|
|
build/.update-modules:
|
|
|
|
git submodule update --init --recursive
|
|
|
|
touch $@
|
2019-08-28 16:14:32 +00:00
|
|
|
|
2019-09-04 09:49:22 +00:00
|
|
|
# end git modules
|
2019-08-28 16:14:32 +00:00
|
|
|
|
2019-09-04 09:49:22 +00:00
|
|
|
## PROOFS
|
2019-08-28 16:14:32 +00:00
|
|
|
|
2019-09-13 22:29:38 +00:00
|
|
|
bin/ipget:
|
2019-09-23 11:43:32 +00:00
|
|
|
./bin/dist_get /ipns/dist.ipfs.io ipget bin/ipget v0.5.0
|
2019-09-13 22:29:38 +00:00
|
|
|
|
2019-09-23 10:50:28 +00:00
|
|
|
PARAM_SECTOR_SIZES:=1024 16777216 268435456 1073741824
|
2019-09-04 09:49:22 +00:00
|
|
|
PARAM_SECTOR_SIZES:=$(addprefix build/.params-,$(PARAM_SECTOR_SIZES))
|
2019-08-28 16:42:22 +00:00
|
|
|
|
2019-09-25 19:13:28 +00:00
|
|
|
./build/paramfetch.sh: build/proof-params/parameters.json
|
|
|
|
build/proof-params/mkparamfetch.sh
|
|
|
|
|
|
|
|
$(PARAM_SECTOR_SIZES): ./build/paramfetch.sh build/proof-params/parameters.json bin/ipget
|
|
|
|
./build/paramfetch.sh
|
2019-07-17 11:42:49 +00:00
|
|
|
touch $@
|
2019-07-17 11:17:55 +00:00
|
|
|
|
2019-09-04 09:49:22 +00:00
|
|
|
BUILD_DEPS+=build/.params-1024
|
|
|
|
CLEAN+=build/.params-1024
|
|
|
|
|
2019-07-19 11:56:18 +00:00
|
|
|
CLEAN+=build/.update-modules
|
|
|
|
|
2019-07-17 11:42:49 +00:00
|
|
|
deps: $(BUILD_DEPS)
|
|
|
|
.PHONY: deps
|
2019-07-08 11:00:52 +00:00
|
|
|
|
2019-07-17 11:42:49 +00:00
|
|
|
build: $(BUILD_DEPS)
|
2019-10-02 17:20:30 +00:00
|
|
|
rm -f lotus lotus-storage-miner
|
2019-07-08 11:00:52 +00:00
|
|
|
go build -o lotus ./cmd/lotus
|
2019-07-18 23:16:23 +00:00
|
|
|
go build -o lotus-storage-miner ./cmd/lotus-storage-miner
|
2019-10-02 23:36:33 +00:00
|
|
|
go run github.com/GeertJohan/go.rice/rice append --exec lotus -i ./build
|
|
|
|
go run github.com/GeertJohan/go.rice/rice append --exec lotus-storage-miner -i ./build
|
2019-07-17 11:42:49 +00:00
|
|
|
.PHONY: build
|
2019-07-08 11:00:52 +00:00
|
|
|
|
2019-10-03 18:07:49 +00:00
|
|
|
CLEAN+= lotus lotus-storage-miner
|
|
|
|
|
2019-08-29 22:59:12 +00:00
|
|
|
benchmarks:
|
2019-08-29 23:18:26 +00:00
|
|
|
go run github.com/whyrusleeping/bencher ./... > bench.json
|
2019-08-29 23:25:23 +00:00
|
|
|
@echo Submitting results
|
|
|
|
@curl -X POST 'http://benchmark.kittyhawk.wtf/benchmark' -d '@bench.json' -u "${benchmark_http_cred}"
|
2019-08-29 23:18:26 +00:00
|
|
|
.PHONY: benchmarks
|
2019-08-29 22:59:12 +00:00
|
|
|
|
2019-07-24 21:45:01 +00:00
|
|
|
pond: build
|
|
|
|
go build -o pond ./lotuspond
|
2019-07-25 23:32:38 +00:00
|
|
|
(cd lotuspond/front && npm i && npm run build)
|
2019-07-24 21:45:01 +00:00
|
|
|
.PHONY: pond
|
|
|
|
|
2019-07-19 11:56:18 +00:00
|
|
|
clean:
|
|
|
|
rm -rf $(CLEAN)
|
2019-07-22 22:25:35 +00:00
|
|
|
-$(MAKE) -C $(BLS_PATH) clean
|
2019-08-28 16:42:22 +00:00
|
|
|
-$(MAKE) -C $(SECTOR_BUILDER_PATH) clean
|
2019-07-19 11:56:18 +00:00
|
|
|
.PHONY: clean
|
|
|
|
|
2019-07-17 11:42:49 +00:00
|
|
|
dist-clean:
|
|
|
|
git clean -xdff
|
|
|
|
git submodule deinit --all -f
|
|
|
|
.PHONY: dist-clean
|
2019-07-22 22:25:35 +00:00
|
|
|
|
2019-08-21 17:15:28 +00:00
|
|
|
type-gen:
|
|
|
|
go run ./gen/main.go
|
2019-07-22 22:25:35 +00:00
|
|
|
|
|
|
|
print-%:
|
|
|
|
@echo $*=$($*)
|