summaryrefslogtreecommitdiff
path: root/Makefile
blob: b9d5d51faa2b490df0cfdbaf7308df2b04319367 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
TARGET_EXEC := ceres
BUILD_DIR := ./build
MODULE_NAME := xengineering.eu/ceres

VERSION := $(shell git describe --dirty --always)

all: $(BUILD_DIR)/$(TARGET_EXEC)

$(BUILD_DIR)/$(TARGET_EXEC):
	go build -ldflags "-X main.version=$(VERSION)" -o $@ $(MODULE_NAME)

.PHONY: debug
debug:
	go run -race -ldflags "-X main.version=$(VERSION)" $(MODULE_NAME) -e

.PHONY: tests
tests:
	go test $(MODULE_NAME)/...

.PHONY: clean
clean:
	rm -rf $(BUILD_DIR)