basicwindow/Makefile

42 lines
949 B
Makefile
Raw Permalink Normal View History

VERSION = $(shell git describe --tags)
2024-11-16 00:05:55 -06:00
BUILDTIME = $(shell date +%Y.%m.%d)
all: build
./basicwindow
2024-01-16 16:37:43 -06:00
build:
2024-11-16 00:05:55 -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 \
2024-11-16 00:05:55 -06:00
-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
2024-11-16 00:05:55 -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/
gocui:
2024-11-16 00:05:55 -06:00
./basicwindow --gui gocui
goimports:
goimports -w *.go
2024-11-16 00:05:55 -06:00
# // to globally reset paths:
# // gofmt -w -r "go.wit.com/gui -> go.wit.com/gui/gui" .
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