diff --git a/README.md b/README.md index 1deecce..997f3fa 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ options: - `-v` enable inverse the character color. - `-g` enable gif mode(test), print every frame of gif image. +- `-l` use network url to load image. - `-s value` set the scale for images(value default 0.5, (0, +)). - `-t value` set the threshold of binarization(value default generate by OTSU, [-1, 255]). diff --git a/cli/makefile b/cli/makefile deleted file mode 100644 index fc861d8..0000000 --- a/cli/makefile +++ /dev/null @@ -1,18 +0,0 @@ -VERSION=V1.4.0 -EXE=bobibo -DESTDIR := - -.PHONY: default build install uninstall -default: build - -build: 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 !!! diff --git a/makefile b/makefile index 030e823..edec835 100644 --- a/makefile +++ b/makefile @@ -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