updated Makefile
This commit is contained in:
parent
ccf383db09
commit
52ccdce51f
1 changed files with 28 additions and 5 deletions
33
Makefile
33
Makefile
|
@ -1,10 +1,33 @@
|
||||||
|
APP=statusline
|
||||||
|
BUILDFLAGS=
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
build: statusline.go
|
.PHONY: run
|
||||||
go build statusline.go
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
go run statusline.go
|
go run .
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
go clean
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
build: clean
|
||||||
|
go build -o "${APP}" ${BUILDFLAGS}
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
install:
|
install:
|
||||||
go build -o ~/bin/statusline statusline.go
|
go install ${BUILDFLAGS}
|
||||||
|
|
||||||
|
.PHONY: uninstall
|
||||||
|
uninstall:
|
||||||
|
go clean -i
|
||||||
|
|
||||||
|
.PHONY: release
|
||||||
|
release:
|
||||||
|
rm -f release/*
|
||||||
|
GOOS=linux GOARCH=amd64 go build -o "release/${APP}_linux_amd64" -trimpath ${BUILDFLAGS}
|
||||||
|
GOOS=linux GOARCH=arm64 go build -o "release/${APP}_linux_arm64" -trimpath ${BUILDFLAGS}
|
||||||
|
GOOS=linux GOARCH=386 go build -o "release/${APP}_linux_386" -trimpath ${BUILDFLAGS}
|
||||||
|
GOOS=windows GOARCH=amd64 go build -o "release/${APP}_windows_amd64.exe" -trimpath ${BUILDFLAGS}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue