~gpanders/ijq

ref: fd32f364b63f36998a9c89b6ef461a56c66bab4e ijq/Makefile -rw-r--r-- 285 bytes
fd32f364 — Greg Anders Add command to print version 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
SRCS := main.go

VERSION := 0.1.0

.PHONY: all
all: ijq

ijq: $(SRCS)
	go build -ldflags="-s -w -X main.Version=$(VERSION)" -o $@

.PHONY: install
install: ijq
	mkdir -p $(BINDIR)
	install -m 0755 $< $(BINDIR)

.PHONY: clean
clean:
	rm ijq