-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from orzation/1.4.0
Modify makefile and readme
- Loading branch information
Showing
3 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,32 @@ | ||
.PHONY: build block cpu mem | ||
VERSION=V1.4.0 | ||
EXE=bobibo | ||
DESTDIR := | ||
|
||
.PHONY: default build install uninstall block cpu mem | ||
default: build | ||
|
||
build: cli/cli.go | ||
go build -ldflags="-X 'main.version=$(VERSION)' -s -w" -o $(EXE) | ||
@echo Build Success !!! | ||
|
||
install: $(EXE) | ||
install -Dm755 $(EXE) $(DESTDIR)/usr/bin/$(EXE) | ||
@echo install Success !!! | ||
|
||
uninstall: | ||
rm -f $(DESTDIR)/usr/bin/$(EXE) | ||
@echo uninstall Success !!! | ||
|
||
test: | ||
go test -bench=. -cpu=4 -blockprofile=block.pprof -cpuprofile=cpu.pprof -memprofile=mem.pprof | ||
|
||
block: block.pprof | ||
go tool pprof -http=:9999 block.pprof | ||
|
||
cpu: cpu.pprof | ||
go tool pprof -http=:9999 cpu.pprof | ||
|
||
mem: mem.pprof | ||
|
||
go tool pprof -http=:9999 mem.pprof | ||
|