Parametrize the abra path

This commit is contained in:
decentral1se 2021-07-15 22:26:40 +02:00
parent 462a4d296f
commit 567dae83cf
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -2,17 +2,18 @@ COMMIT := $(shell git rev-list -1 HEAD)
VERSION := $(shell cat ./version)
GOPATH := $(shell go env GOPATH)
LDFLAGS := "-X 'main.Commit=$(COMMIT)' -X 'main.Version=$(VERSION)'"
ABRA := ./cmd/abra
all: run install build clean
run:
go run -ldflags=$(LDFLAGS) ./cmd/abra
go run -ldflags=$(LDFLAGS) $(ABRA)
install:
go install -ldflags=$(LDFLAGS) ./cmd/abra
go install -ldflags=$(LDFLAGS) $(ABRA)
build:
go build -ldflags=$(LDFLAGS) ./cmd/abra
go build -ldflags=$(LDFLAGS) $(ABRA)
clean:
rm '$(GOPATH)/bin/abra'