github.com/cryptotooltop/go-ethereum@v0.0.0-20231103184714-151d1922f3e5/Makefile (about)

     1  # This Makefile is meant to be used by people that do not usually work
     2  # with Go source code. If you know what GOPATH is then you probably
     3  # don't need to bother with make.
     4  
     5  .PHONY: geth android ios evm all test clean libzkp
     6  
     7  GOBIN = ./build/bin
     8  GO ?= latest
     9  GORUN = env GO111MODULE=on go run
    10  
    11  libzkp:
    12  	cd $(PWD)/rollup/circuitcapacitychecker/libzkp && make libzkp
    13  
    14  nccc_geth: ## geth without circuit capacity checker
    15  	$(GORUN) build/ci.go install ./cmd/geth
    16  	@echo "Done building."
    17  	@echo "Run \"$(GOBIN)/geth\" to launch geth."
    18  
    19  geth: libzkp
    20  	$(GORUN) build/ci.go install -buildtags circuit_capacity_checker ./cmd/geth
    21  	@echo "Done building."
    22  	@echo "Run \"$(GOBIN)/geth\" to launch geth."
    23  
    24  all:
    25  	$(GORUN) build/ci.go install
    26  
    27  android:
    28  	$(GORUN) build/ci.go aar --local
    29  	@echo "Done building."
    30  	@echo "Import \"$(GOBIN)/geth.aar\" to use the library."
    31  	@echo "Import \"$(GOBIN)/geth-sources.jar\" to add javadocs"
    32  	@echo "For more info see https://stackoverflow.com/questions/20994336/android-studio-how-to-attach-javadoc"
    33  
    34  ios:
    35  	$(GORUN) build/ci.go xcode --local
    36  	@echo "Done building."
    37  	@echo "Import \"$(GOBIN)/Geth.framework\" to use the library."
    38  
    39  test: all
    40  	# genesis test
    41  	cd ${PWD}/cmd/geth; go test -test.run TestCustomGenesis
    42  	# module test
    43  	$(GORUN) build/ci.go test ./consensus ./core ./eth ./miner ./node ./trie
    44  
    45  lint: ## Run linters.
    46  	$(GORUN) build/ci.go lint
    47  
    48  clean:
    49  	env GO111MODULE=on go clean -cache
    50  	rm -fr build/_workspace/pkg/ $(GOBIN)/*
    51  
    52  # The devtools target installs tools required for 'go generate'.
    53  # You need to put $GOBIN (or $GOPATH/bin) in your PATH to use 'go generate'.
    54  
    55  devtools:
    56  	env GOBIN= go install golang.org/x/tools/cmd/stringer@latest
    57  	env GOBIN= go install github.com/kevinburke/go-bindata/go-bindata@latest
    58  	env GOBIN= go install github.com/fjl/gencodec@latest
    59  	env GOBIN= go install github.com/golang/protobuf/protoc-gen-go@latest
    60  	env GOBIN= go install ./cmd/abigen
    61  	@type "solc" 2> /dev/null || echo 'Please install solc'
    62  	@type "protoc" 2> /dev/null || echo 'Please install protoc'
    63  
    64  docker:
    65  	docker build --platform linux/x86_64 -t scrolltech/l2geth:latest ./ -f Dockerfile
    66  
    67  mockccc_docker:
    68  	docker build --platform linux/x86_64 -t scrolltech/l2geth:latest ./ -f Dockerfile.mockccc
    69  
    70  mockccc_alpine_docker:
    71  	docker build --platform linux/x86_64 -t scrolltech/l2geth:latest ./ -f Dockerfile.mockccc.alpine