-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (44 loc) · 1.59 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
compile:
go build -o barley main.go
run:
go run main.go
linux:
GOOS=linux GOARCH=amd64 go build -o barley main.go
darwin:
GOOS=darwin GOARCH=amd64 go build -o barley main.go
brew:
GOOS=darwin GOARCH=amd64 go build -o ./bin/brew/barley main.go
GOOS=darwin GOARCH=arm64 go build -o ./bin/brew/barley-silicon main.go
wait
tar -czf ./bin/brew/barley.tar.gz ./bin/brew/barley
tar -czf ./bin/brew/barley-silicon.tar.gz ./bin/brew/barley-silicon
win:
GOOS=windows GOARCH=amd64 go build -o barley main.go
linux-arm:
GOOS=linux GOARCH=arm go build -o barley main.go
darwin-arm64:
GOOS=darwin GOARCH=arm64 go build -o barley main.go
win-arm:
GOOS=windows GOARCH=arm go build -o barley main.go
build:
echo "building binary for windows amd64"
GOOS=windows GOARCH=amd64 go build -o ./bin/barley-win-amd64.exe main.go
echo "building binary for darwin amd64"
GOOS=darwin GOARCH=amd64 go build -o ./bin/barley-mac-amd64 main.go
echo "building binary for linux amd64"
GOOS=linux GOARCH=amd64 go build -o ./bin/barley-linux-amd64 main.go
echo "building binary for windows arm"
GOOS=windows GOARCH=arm go build -o ./bin/arm/barley-win-arm.exe main.go
echo "building binary for darwin arm64"
GOOS=darwin GOARCH=arm64 go build -o ./bin/arm/barley-mac-arm64 main.go
echo "building binary for linux arm"
GOOS=linux GOARCH=arm go build -o ./bin/arm/barley-linux-arm main.go
clean:
rm -rf bin
installjson:
mkdir -p ~/.config/barley
cp ./languages.json ~/.config/barley/languages.json
install:
mkdir -p ~/.config/barley
cp ./languages.json ~/.config/barley/languages.json
sudo go build -o /usr/bin/barley main.go