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
|
|
|
BUILD_DEPS+=lib/sectorbuilder/include/sector_builder_ffi.h
|
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:=
|
|
|
|
|
|
|
|
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-07-16 15:14:16 +00:00
|
|
|
|
2019-07-17 11:42:49 +00:00
|
|
|
lib/sectorbuilder/include/sector_builder_ffi.h: lib/sectorbuilder lib/sectorbuilder/rust-fil-sector-builder
|
2019-07-17 11:15:48 +00:00
|
|
|
./lib/sectorbuilder/build.sh
|
2019-07-17 11:42:49 +00:00
|
|
|
@touch $@
|
|
|
|
|
|
|
|
MODULES+=lib/sectorbuilder
|
|
|
|
MODULES+=lib/sectorbuilder/rust-fil-sector-builder
|
|
|
|
|
|
|
|
$(MODULES): build/.update-modules ;
|
2019-07-16 15:18:03 +00:00
|
|
|
|
2019-07-17 11:42:49 +00:00
|
|
|
# dummy file that marks the last time modules were updated
|
|
|
|
build/.update-modules:
|
|
|
|
git submodule update --init --recursive
|
|
|
|
touch $@
|
2019-07-17 11:17:55 +00:00
|
|
|
|
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-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-07-17 11:42:49 +00:00
|
|
|
.PHONY: build
|
2019-07-08 11:00:52 +00:00
|
|
|
|
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-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
|
|
|
|
|
|
|
|
|
|
|
print-%:
|
|
|
|
@echo $*=$($*)
|