-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (15 loc) · 712 Bytes
/
Makefile
File metadata and controls
21 lines (15 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
AUTHOR=-X github.com/jamesbcook/peepingJim.Version=4.0.0
VERSION=-X "github.com/jamesbcook/peepingJim.Author=James Cook <@_jbcook>"
USERAGENT=-X "github.com/jamesbcook/peepingJim.UserAgent=peepingJim/4.0.0"
OUTPUT_DIR=bin
setup:
mkdir -p $(OUTPUT_DIR)
linux: setup
GOOS=linux GOARCH=amd64 go build -ldflags '$(AUTHOR) $(VERSION) $(USERAGENT)' -v -o $(OUTPUT_DIR)/peepingJim_linux_amd64 cmd/main.go
osx: setup
GOOS=darwin GOARCH=amd64 go build -ldflags '$(AUTHOR) $(VERSION) $(USERAGENT)' -v -o $(OUTPUT_DIR)/peepingJim_darwin_amd64 cmd/main.go
docker: setup
go build -ldflags '$(AUTHOR) $(VERSION) $(USERAGENT)' -v -o $(OUTPUT_DIR)/peepingJim cmd/main.go
release: linux osx
clean:
rm -r $(OUTPUT_DIR)