forked from ooclab/otunnel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (32 loc) · 999 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
# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOINSTALL=$(GOCMD) install
GOTEST=$(GOCMD) test
GODEP=$(GOTEST) -i
GOFMT=gofmt -w
# LDFLAGS=-ldflags "-s"
LDFLAGS=-ldflags "-s -X main.buildstamp=`date '+%Y-%m-%d_%H:%M:%S_%z'` -X main.githash=`git rev-parse HEAD`"
#LDFLAGS=
PROGRAM_NAME=otunnel
all:
cd cmd/otunnel; $(GOBUILD) -v $(LDFLAGS) -o $(PROGRAM_NAME)
install:
$(GOINSTALL) -v
clean:
@rm $(PROGRAM_NAME)
mac:
GOOS=darwin GOARCH=amd64 $(GOBUILD) -v $(LDFLAGS) -o $(PROGRAM_NAME)
linux-64:
GOOS=linux GOARCH=amd64 $(GOBUILD) -v $(LDFLAGS) -o $(PROGRAM_NAME)
linux-32:
GOOS=linux GOARCH=386 $(GOBUILD) -v $(LDFLAGS) -o $(PROGRAM_NAME)
windows-64:
GOOS=windows GOARCH=amd64 $(GOBUILD) -v $(LDFLAGS) -o $(PROGRAM_NAME)
windows-32:
GOOS=windows GOARCH=386 $(GOBUILD) -v $(LDFLAGS) -o $(PROGRAM_NAME)
ddwrt:
GOARCH=arm GOOS=linux GOARM=5 $(GOBUILD) -v $(LDFLAGS) -o $(PROGRAM_NAME)
arm:
GOARCH=arm GOOS=linux GOARM=7 $(GOBUILD) -v $(LDFLAGS) -o $(PROGRAM_NAME)