-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
23 lines (17 loc) · 863 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
Version := $(shell date "+%Y%m%d%H%M")
GitCommit := $(shell git rev-parse HEAD)
DIR := $(shell pwd)
LDFLAGS := -s -w -X main.Version=$(Version) -X main.GitCommit=$(GitCommit)
run: build
./build/debug/adanos-mail-connector
run-md: build
./build/debug/adanos-mail-connector --html2md
build:
go build -race -ldflags "$(LDFLAGS)" -o build/debug/adanos-mail-connector main.go
build-release:
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o build/release/adanos-mail-connector-darwin main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o build/release/adanos-mail-connector.exe main.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o build/release/adanos-mail-connector-linux main.go
clean:
rm -fr build/debug/adanos-* build/release/adanos-*
.PHONY: run build build-release clean