-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (32 loc) · 1.09 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
.PHONY:all
all: build_debug run
.PHONY:run
run:
./nogo45
.PHONY:build_debug
build_debug: *.go assets/*
go build -tags=debug .
.PHONY:clean
clean:
rm -rf dist/
rm -rf nogo45
rm -rf nogo45-linux-amd64
rm -rf nogo45-windows-4.0-amd64.exe
rm -rf nogo45-darwin-10.6-amd64
.PHONY:build
build: *.go assets/* clean nogo45-linux-amd64 nogo45-windows-4.0-amd64.exe nogo45-darwin-10.6-amd64
mkdir -p dist
.PHONY:dist
dist: build
zip dist/windows.zip nogo45-windows-4.0-amd64.exe -r assets
zip dist/windows-32.zip nogo45-windows-4.0-386.exe -r assets
zip dist/mac.zip nogo45-darwin-10.6-amd64 -r assets
zip dist/linux.zip nogo45-linux-amd64 -r assets
nogo45-linux-amd64: *.go assets/*
GOOS=linux GOARCH=amd64 go build -o nogo45-linux-amd64 .
nogo45-windows-4.0-amd64.exe: *.go assets/*
xgo -go 1.12 --targets=windows/amd64 -ldflags='-H=windowsgui' github.com/bcvery1/nogo45
nogo45-windows-4.0-386.exe: *.go assets/*
xgo -go 1.12 --targets=windows/386 -ldflags='-H=windowsgui' github.com/bcvery1/nogo45
nogo45-darwin-10.6-amd64: *.go assets/*
xgo -go 1.12 --targets=darwin/amd64 github.com/bcvery1/nogo45