-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (34 loc) · 796 Bytes
/
Makefile
File metadata and controls
44 lines (34 loc) · 796 Bytes
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
# Go parameters
GOCMD = go
GOBUILD = $(GOCMD) build
GOCLEAN = $(GOCMD) clean
GOTEST = $(GOCMD) test
GOGET = $(GOCMD) get
# Binary name
BINARY_NAME = gopher
# Build the project
build:
$(GOBUILD) -o $(BINARY_NAME) ./cmd/gopher
# Clean build files
clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)
# Run all tests
test:
$(GOTEST) -v ./...
# Install project dependencies
deps:
$(GOGET) -v ./...
# Run the application
run:
$(GOBUILD) -o $(BINARY_NAME) ./cmd/gopher
./$(BINARY_NAME)
# Install the application
install:
$(GOBUILD) -o $(BINARY_NAME) github.com/theghostmac/gopher/cmd/gopher
#mv $(BINARY_NAME) $(GOPATH)/bin/$(BINARY_NAME)
mv gopher /Users/macbobbychibuzor/go/bin/gopher
# Uninstall the application
uninstall:
rm -f $(GOPATH)/bin/$(BINARY_NAME)
.PHONY: build clean test deps run