Skip to content

Commit 6cb91cc

Browse files
committed
Add Makefile
1 parent 836e899 commit 6cb91cc

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Makefile for go-bitcoinkernel
2+
3+
.PHONY: all build-kernel test clean help
4+
5+
all: build-kernel test
6+
7+
build-kernel:
8+
cd depend/bitcoin && \
9+
cmake -B build -DBUILD_SHARED_LIBS=ON -DBUILD_KERNEL_LIB=ON -DBUILD_BENCH=OFF -DBUILD_CLI=OFF -DBUILD_DAEMON=OFF -DBUILD_FOR_FUZZING=OFF -DBUILD_FUZZ_BINARY=OFF -DBUILD_GUI=OFF -DBUILD_KERNEL_TEST=OFF -DBUILD_TESTS=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DBUILD_UTIL_CHAINSTATE=OFF -DBUILD_WALLET_TOOL=OFF -DENABLE_WALLET=OFF && \
10+
cmake --build build --target bitcoinkernel -j $(shell nproc 2>/dev/null || echo 4)
11+
12+
test: build-kernel
13+
go test -v ./...
14+
15+
clean:
16+
rm -rf depend/bitcoin/build
17+
go clean ./...
18+
19+
lint:
20+
golangci-lint run ./...
21+
22+
deps:
23+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
24+
25+
help:
26+
@echo "Available targets:"
27+
@echo " all - Build kernel library and run tests (default)"
28+
@echo " build-kernel - Build Bitcoin kernel library"
29+
@echo " test - Run Go tests"
30+
@echo " clean - Clean build artifacts"
31+
@echo " lint - Lint Go code"
32+
@echo " deps - Install development dependencies"
33+
@echo " help - Show this help message"

0 commit comments

Comments
 (0)