summaryrefslogtreecommitdiff
path: root/Makefile
blob: 107566ae957433237f3a173ac4d23de82ef2c92c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Copyright (c) 2023 Nicolas Paul All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

BINARY := crocc

VERSION := $(shell git describe --tags --always --dirty)
DATE := $(shell date -u '+%FT%T%z')

LDFLAGS := -ldflags "-w -s -X main.version=$(VERSION) -X main.date=$(DATE)"

$(BINARY): *.go
	go build $(LDFLAGS) -o $(BINARY)

test: *.go
	go test -v ./...

clean:
	rm -f $(BINARY)

.PHONY: clean test