forked from filecoin-project/filecoin-ffi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (29 loc) · 785 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
DEPS:=filcrypto.h filcrypto.pc libfilcrypto.a
all: $(DEPS)
.PHONY: all
# Create a file so that parallel make doesn't call `./install-filcrypto` for
# each of the deps
$(DEPS): .install-filcrypto ;
.install-filcrypto: rust
./install-filcrypto
@touch $@
clean:
rm -rf $(DEPS) .install-filcrypto
rm -f ./runner
.PHONY: clean
go-lint: $(DEPS)
golangci-lint run -v --concurrency 2 --new-from-rev origin/master
.PHONY: go-lint
shellcheck:
shellcheck install-filcrypto
lint: shellcheck go-lint
cgo-leakdetect: runner
valgrind --leak-check=full --show-leak-kinds=definite ./runner
.PHONY: cgo-leakdetect
cgo-gen: $(DEPS)
c-for-go --ccincl --ccdefs --nostamp filcrypto.yml
.PHONY: cgo-gen
runner: $(DEPS)
rm -f ./runner
go build -o ./runner ./cgoleakdetect/
.PHONY: runner