summaryrefslogtreecommitdiff
path: root/Makefile
blob: 1e8ecd6322197c6d7869e817d93d303d1b1522e3 (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
.PHONY: debian

VERSION = $(shell git describe --tags)
DATE = $(shell date +%Y.%m.%d)

run: clean goimports vet install
	go-deb --gui andlabs gui

junk:
	#go-deb --release go.wit.com/apps/go-mod-clean --dir /tmp/
	#go-deb go.wit.com/apps/autotypist
	#ls -lth /tmp/*deb

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 \
		    -ldflags "-X main.VERSION=${VERSION} -X main.DATE=${DATE} -X gui.GUIVERSION=${VERSION}"

install:
	GO111MODULE="off" go install -v \
		    -ldflags "-X main.VERSION=${VERSION} -X main.DATE=${DATE} -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 --repo go.wit.com/apps/go-gui-toolkits

build-test-failure: build
	./go-deb --release --repo go.wit.com/apps/junk

build-test-keep-files: build
	./go-deb --keep-files --repo go.wit.com/apps/go-deb

build-release:
	go-deb --release --repo go.wit.com/apps/go-deb

debian: build
	./go-deb --keep-files --repo go.wit.com/apps/go-deb

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