restic/cmd/restic/Makefile

22 lines
421 B
Makefile
Raw Normal View History

# try to get version from git
VERSION = $(shell ./version.sh)
VERSION ?= "unknown version"
LDFLAGS = -X main.version $(VERSION)
TAGS =
.PHONY: all clean debug
2014-11-16 15:40:04 +01:00
# include config file if it exists
-include $(CURDIR)/config.mk
2014-12-05 21:45:49 +01:00
all: restic
2014-12-05 21:45:49 +01:00
restic: $(wildcard *.go) $(wildcard ../../*.go) $(wildcard ../../*/*.go)
go build $(TAGS) -ldflags "$(LDFLAGS)"
2014-12-06 22:01:54 +01:00
debug: TAGS=-tags "debug debug_cmd"
2014-12-05 21:45:49 +01:00
debug: restic
clean:
go clean