forked from blueimp/aws-smtp-relay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (39 loc) · 916 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# --- Variables ---
# The project name:
PROJECT=aws-smtp-relay
# The absolute path for the project's binary installation:
BIN_PATH = $(GOPATH)/bin/$(PROJECT)
# Files that require a rebuild on change:
DEPS = internal/relay/relay.go main.go
# --- Main targets ---
all: $(PROJECT)
# Runs go vet and staticcheck for all components:
lint:
go vet ./...
staticcheck ./...
# Runs the unit tests for all components:
test:
go test ./...
# Installs the binary in $GOPATH/bin/:
install: $(BIN_PATH)
# Deletes the binary from $GOPATH/bin/:
uninstall:
rm -f $(BIN_PATH)
# Removes all build artifacts:
clean:
rm -f $(PROJECT)
# --- Helper targets ---
# Defines phony targets (targets without a corresponding target file):
.PHONY: \
all \
lint \
test \
install \
uninstall \
clean
# Builds the project:
$(PROJECT): $(DEPS)
go build
# Installs the binary in $GOPATH/bin/:
$(BIN_PATH): $(DEPS)
go install