Cleanup makefile
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
parent
0464fb8b7c
commit
5ccaa32ae6
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ lotus
|
|||||||
**/*.h
|
**/*.h
|
||||||
**/*.a
|
**/*.a
|
||||||
**/*.pc
|
**/*.pc
|
||||||
|
build/.update-modules
|
||||||
|
38
Makefile
38
Makefile
@ -1,21 +1,41 @@
|
|||||||
all: build
|
all: build
|
||||||
|
.PHONY: all
|
||||||
|
|
||||||
blssigs: lib/bls-signatures/include/libbls_signatures.h
|
BUILD_DEPS:=lib/bls-signatures/include/libbls_signatures.h
|
||||||
|
BUILD_DEPS+=lib/sectorbuilder/include/sector_builder_ffi.h
|
||||||
|
|
||||||
lib/bls-signatures/include/libbls_signatures.h: lib/bls-signatures/bls-signatures ;
|
# git modules that need to be loaded
|
||||||
|
MODULES:=
|
||||||
|
|
||||||
|
lib/bls-signatures/include/libbls_signatures.h: lib/bls-signatures/bls-signatures
|
||||||
./scripts/install-bls-signatures.sh
|
./scripts/install-bls-signatures.sh
|
||||||
|
@touch $@
|
||||||
|
|
||||||
sectorbuilder: lib/sectorbuilder/include/sector_builder_ffi.h
|
MODULES+=lib/bls-signatures/bls-signatures
|
||||||
|
|
||||||
lib/sectorbuilder/include/sector_builder_ffi.h: lib/sectorbuilder lib/sectorbuilder/rust-fil-sector-builder ;
|
|
||||||
|
lib/sectorbuilder/include/sector_builder_ffi.h: lib/sectorbuilder lib/sectorbuilder/rust-fil-sector-builder
|
||||||
./lib/sectorbuilder/build.sh
|
./lib/sectorbuilder/build.sh
|
||||||
|
@touch $@
|
||||||
|
|
||||||
lib/sectorbuilder:
|
MODULES+=lib/sectorbuilder
|
||||||
git submodule update --init --recursive lib/sectorbuilder
|
MODULES+=lib/sectorbuilder/rust-fil-sector-builder
|
||||||
|
|
||||||
deps: blssigs sectorbuilder
|
$(MODULES): build/.update-modules ;
|
||||||
|
|
||||||
build: deps
|
# dummy file that marks the last time modules were updated
|
||||||
|
build/.update-modules:
|
||||||
|
git submodule update --init --recursive
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
deps: $(BUILD_DEPS)
|
||||||
|
.PHONY: deps
|
||||||
|
|
||||||
|
build: $(BUILD_DEPS)
|
||||||
go build -o lotus ./cmd/lotus
|
go build -o lotus ./cmd/lotus
|
||||||
|
.PHONY: build
|
||||||
|
|
||||||
.PHONY: all build deps blssigs
|
dist-clean:
|
||||||
|
git clean -xdff
|
||||||
|
git submodule deinit --all -f
|
||||||
|
.PHONY: dist-clean
|
||||||
|
Loading…
Reference in New Issue
Block a user