sircd/Makefile

21 lines
355 B
Makefile

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)"
default: run
run: build
./ircd
build: ./ircd
./ircd: *.go */*.go
go build -o $@ $(GOFLAGS) .
fmt:
go fmt *.go
go fmt sircd/*.go