fix makefile
This commit is contained in:
parent
3203dfbb0e
commit
6bb1b9acd7
31
Makefile
31
Makefile
|
@ -1,24 +1,37 @@
|
||||||
VERSION = $(shell git describe --tags)
|
VERSION = $(shell git describe --tags)
|
||||||
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
all:
|
|
||||||
all: build
|
all: build
|
||||||
reset
|
|
||||||
./basicwindow
|
./basicwindow
|
||||||
|
|
||||||
build:
|
build:
|
||||||
-rm -f basicwindow
|
GO111MODULE=off go build \
|
||||||
GO111MODULE=off go build -v -x \
|
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
|
||||||
-ldflags "-X main.VERSION=${VERSION}"
|
|
||||||
|
|
||||||
stderr: build
|
verbose:
|
||||||
echo "writing to /tmp/basicwindow.out"
|
GO111MODULE=off go build -v -x \
|
||||||
./basicwindow >/tmp/basicwindow.out 2>&1
|
-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
|
||||||
|
|
||||||
|
# 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:
|
gocui:
|
||||||
./basicwindow --gui gocui >/tmp/basicwindow.out 2>&1
|
./basicwindow --gui gocui
|
||||||
|
|
||||||
goimports:
|
goimports:
|
||||||
goimports -w *.go
|
goimports -w *.go
|
||||||
|
# // to globally reset paths:
|
||||||
|
# // gofmt -w -r "go.wit.com/gui -> go.wit.com/gui/gui" .
|
||||||
|
|
||||||
redomod:
|
redomod:
|
||||||
rm -f go.*
|
rm -f go.*
|
||||||
|
|
Loading…
Reference in New Issue