2024-11-07 13:30:17 -06:00
|
|
|
VERSION = $(shell git describe --tags)
|
2024-11-16 00:07:09 -06:00
|
|
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
2024-11-07 13:30:17 -06:00
|
|
|
|
2024-01-17 03:02:12 -06:00
|
|
|
all: build
|
2024-11-07 13:30:17 -06:00
|
|
|
./gadgetwindow
|
|
|
|
|
|
|
|
build:
|
2024-11-16 00:07:09 -06:00
|
|
|
GO111MODULE=off go build \
|
|
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
|
|
|
|
verbose:
|
|
|
|
GO111MODULE=off go build -v -x \
|
|
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
|
|
|
|
install:
|
|
|
|
GO111MODULE=off go install \
|
|
|
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
|
|
|
|
|
|
|
clean:
|
2024-11-07 13:30:17 -06:00
|
|
|
-rm -f gadgetwindow
|
|
|
|
-rm resources/*.so
|
|
|
|
touch resources/blank.so
|
|
|
|
|
2024-11-16 00:07:09 -06:00
|
|
|
# embed the toolkit plugins in the binary
|
|
|
|
embed:
|
|
|
|
-rm resources/*.so
|
|
|
|
touch resources/blank.so
|
|
|
|
cp -a ~/go/src/go.wit.com/toolkits/*.so resources/
|
2024-01-16 16:37:43 -06:00
|
|
|
|
2024-01-27 09:04:43 -06:00
|
|
|
nocui: build
|
|
|
|
reset
|
|
|
|
./gadgetwindow --gui nocui
|
|
|
|
|
2024-01-27 15:45:56 -06:00
|
|
|
gocui: build
|
|
|
|
reset
|
2024-02-12 10:14:50 -06:00
|
|
|
echo "redirecting STDOUT & STDERR to /tmp/gadgetwindow.out"
|
2024-11-16 00:07:09 -06:00
|
|
|
./gadgetwindow --gui gocui
|
2024-01-27 15:45:56 -06:00
|
|
|
|
2024-01-27 09:04:43 -06:00
|
|
|
debugger: build
|
|
|
|
reset
|
|
|
|
./gadgetwindow --debugger
|
|
|
|
|
2024-01-20 16:13:54 -06:00
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
|
|
|
|
2024-01-16 16:37:43 -06:00
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
2024-01-18 19:08:33 -06:00
|
|
|
goimports -w *.go
|
2024-01-16 16:37:43 -06:00
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|