gadgetwindow/Makefile

51 lines
1.1 KiB
Makefile
Raw Permalink Normal View History

VERSION = $(shell git describe --tags)
2024-11-16 00:07:09 -06:00
BUILDTIME = $(shell date +%Y.%m.%d)
all: build
./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:
-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
nocui: build
reset
./gadgetwindow --gui nocui
gocui: build
reset
echo "redirecting STDOUT & STDERR to /tmp/gadgetwindow.out"
2024-11-16 00:07:09 -06:00
./gadgetwindow --gui gocui
debugger: build
reset
./gadgetwindow --debugger
goimports:
goimports -w *.go
2024-01-16 16:37:43 -06:00
redomod:
rm -f go.*
goimports -w *.go
2024-01-16 16:37:43 -06:00
GO111MODULE= go mod init
GO111MODULE= go mod tidy