2019-08-21 08:15:45 +00:00
|
|
|
VERSION := $(shell git rev-parse --short HEAD)
|
|
|
|
BUILDTIME := $(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
|
|
|
|
|
|
|
|
GOLDFLAGS += -X main.Version=$(VERSION)
|
|
|
|
GOLDFLAGS += -X main.Buildtime=$(BUILDTIME)
|
|
|
|
GOFLAGS = -ldflags "$(GOLDFLAGS)"
|
|
|
|
|
2019-08-19 23:30:59 +00:00
|
|
|
default: run
|
|
|
|
|
2019-08-21 08:15:45 +00:00
|
|
|
run: build
|
|
|
|
./ircd
|
|
|
|
|
|
|
|
build: ./ircd
|
|
|
|
|
|
|
|
./ircd: *.go */*.go
|
|
|
|
go build -o $@ $(GOFLAGS) .
|
2019-08-20 02:15:56 +00:00
|
|
|
|
|
|
|
fmt:
|
|
|
|
go fmt *.go
|
|
|
|
go fmt sircd/*.go
|