-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (24 loc) · 1008 Bytes
/
Makefile
File metadata and controls
29 lines (24 loc) · 1008 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
# Meta
VERSION=`git describe --always`
DATE=`date`
LDFLAGS := -X 'main.version=$(VERSION)' -X 'main.date=$(DATE)'
# Setup
setup:
go get golang.org/x/lint/golint
go get golang.org/x/tools/cmd/goimports
go get github.com/Songmu/make2help/cmd/make2help
# Install dependencies
deps: setup
go get ./...
# Build
build: deps
GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o bin/linux64/text2img app/cli/app.go
GOOS=linux GOARCH=386 go build -ldflags "$(LDFLAGS)" -o bin/linux386/text2img app/cli/app.go
GOOS=windows GOARCH=386 go build -ldflags "$(LDFLAGS)" -o bin/windows386/text2img.exe app/cli/app.go
GOOS=windows GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o bin/windows64/text2img.exe app/cli/app.go
GOOS=darwin GOARCH=386 go build -ldflags "$(LDFLAGS)" -o bin/darwin386/text2img app/cli/app.go
GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o bin/darwin64/text2img app/cli/app.go
# Show help
help:
@make2help $(MAKEFILE_LIST)
.PHONY: setup deps build help