Skip to content

Commit

Permalink
Merge pull request #7 from orzation/1.4.0
Browse files Browse the repository at this point in the history
Modify makefile and readme
  • Loading branch information
msqtt authored Sep 29, 2023
2 parents dce5393 + da546a1 commit 2078656
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]).

Expand Down
18 changes: 0 additions & 18 deletions cli/makefile

This file was deleted.

23 changes: 22 additions & 1 deletion makefile
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

0 comments on commit 2078656

Please sign in to comment.