-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
61 lines (43 loc) · 1.64 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
57
58
59
60
61
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
BINARY_NAME=influxgui
BINARY_UNIX=$(BINARY_NAME)_unix
all: test build
js-lint:
./node_modules/.bin/eslint assets/main-ko.js
go-lint:
${GOPATH}/bin/golint ./
lint: js-lint go-lint
test:
${GOTEST}
clean:
rm -rf ./build
init: clean
mkdir -p ./build
compile-assets:
go-bindata -o assets.go -prefix assets/ assets/ assets/media/
build-dev: compile-assets
ENV="develop" mkdir -p ./build && ${GOBUILD} -o ./build/${BINARY_NAME}_linux -v *.go
build: test build-linux
xgo -dest ./build/ -targets windows/*,darwin/* github.com/Atihinen/influxgui
build-staging: test build-linux
xgo -branch `git branch` -dest ./build/ -targets windows/*,darwin/* github.com/Atihinen/influxgui
build-apple: init compile-assets
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 ${GOBUILD} -o ./build/${BINARY_NAME}_macOS -v *.go
build-linux: init compile-assets
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 ${GOBUILD} -o ./build/${BINARY_NAME}_linux -v *.go
build-windows: init compile-assets
GOOS=windows GOARCH=386 CGO_ENABLED=1 CXX=i686-w64-mingw32-g++ CC=i686-w64-mingw32-gcc ${GOBUILD} -o ./build/${BINARY_NAME}_windosX86.exe -v *.go
build-windows-dev: init compile-assets
ENV="develop" GOOS=windows GOARCH=386 CGO_ENABLED=1 CXX=i686-w64-mingw32-g++ CC=i686-w64-mingw32-gcc ${GOBUILD} -o ./build/${BINARY_NAME}_dev_windosX86.exe -v *.go
release: init compile-assets build-apple build-windows
run: build-dev
./build/${BINARY_NAME}_linux
#from linux to win
#sudo apt-get install gcc-multilib
#sudo apt-get install gcc-mingw-w64
#sudo apt-get install gobjc++
#sudo apt install gobjc++-mingw-w64