main
Makefile
1.POSIX:
2
3SHELL = /bin/sh
4GO ?= go
5PREFIX ?= /usr/local
6BINDIR = $(PREFIX)/bin
7
8.PHONY: all
9all:
10 $(GO) build ./cmd/webfetch
11
12.PHONY: install
13install: all
14 install -Dm755 ./webfetch $(BINDIR)/webfetch
15
16clean:
17 rm ./webfetch
18
19test:
20 go test ./...
21
22format:
23 go fmt ./...
24
25.PHONY: help
26help:
27 @echo "Usage:"
28 @echo "all: make webfetch"
29 @echo "install: install webfetch"