summaryrefslogtreecommitdiff
path: root/Makefile
blob: 417388c3b1033225b6185dd22c897a2576ca5024 (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
72
73
74
75
.PHONY: debian go-deb

VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%s)

run: clean goimports vet install
	go-deb

# builds a .deb of go-deb and writes the file here in this directory
go-deb:
	go-deb

go-deb-keep-files:
	go-deb --keep-files

vet:
	@GO111MODULE=off go vet
	@echo this go library package builds okay

auto-build: build
	./go-deb --repo go.wit.com/apps/autotypist

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}"

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 -f resources/*.so
	touch resources/blank.so

build-go-gui-toolkits: build
	./go-deb --release

build-test-failure: build
	./go-deb --release

build-test-keep-files: build
	./go-deb --keep-files

build-release:
	go-deb --release

debian: build
	./go-deb --keep-files

test2:
	go-deb go.wit.com/apps/utils/go-gui-toolkits  --dir /tmp