blob: 43993eb8dd0cadfaa75305e84442d5e21df27b84 (
plain)
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
62
63
64
65
66
67
68
69
70
71
|
.PHONY: build
VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%s)
run: clean goimports vet install
VERBOSE=true go-deb --keep-files --buildversion "4"
# VERBOSE=true go-deb --keep-files --arch riscv64 --buildversion "4"
# builds a .deb of go-deb and writes the file here in this directory
deb.default:
go-deb
deb.riscv64:
go-deb --keep-files --arch riscv64
deb.keep-files:
go-deb --keep-files
vet:
@GO111MODULE=off go vet
@echo this go library package builds okay
build: goimports vet
-rm resources/*.so
touch resources/blank.so
GO111MODULE=off go build -v -x \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
install: goimports
GO111MODULE=off go install \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
build-darwin:
GOOS=darwin GOARCH=amd64 GO111MODULE=off go build -v -o wit-darwin.x86 \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME}"
build-darwin-arm64:
GOOS=darwin GOARCH=arm64 GO111MODULE=off go build -v -o wit-darwin.arm \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME}"
build-windows:
GOOS=windows GOARCH=amd64 GO111MODULE=off go build -v -o wit.exe \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME}"
goimports:
goimports -w *.go
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
reset:
# clear your terminal
reset
# use the ncurses gui (only kinda works still)
ncurses: build
reset
./go-deb --gui gocui
nocui: reset build
./go-deb --gui nocui
clean:
rm -f go.*
rm -f go-deb*
rm -rf files/
rm -f resources/*.so
touch resources/blank.so
|