Updates gui to be an add-on rather than default build mode in makefile and build tags within code
This commit is contained in:
parent
bc3d0e07d9
commit
1e430eaee0
7
Makefile
7
Makefile
|
@ -13,15 +13,14 @@ VERSION_HASH := $(shell git rev-list -1 HEAD)
|
|||
build:
|
||||
${GOCMD} build -ldflags "-w -s -X main.VersionHash=${VERSION_HASH}" -o ${BINARY}
|
||||
|
||||
.PHONY: nogui
|
||||
.PHONY: gui
|
||||
nogui:
|
||||
${GOCMD} build -tags nogui -ldflags "-w -s -X main.VersionHash=${VERSION_HASH}" -o ${BINARY}
|
||||
${GOCMD} build -tags gui -ldflags "-w -s -X main.VersionHash=${VERSION_HASH}" -o ${BINARY}
|
||||
|
||||
.PHONY: install
|
||||
install: install-bin install-man clean
|
||||
|
||||
.PHONY: install-bin
|
||||
install-bin: build
|
||||
install-bin: ${BINARY}
|
||||
install -d ${DESTDIR}${BINDIR}
|
||||
install -m 0755 ./${BINARY} ${DESTDIR}${BINDIR}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//+build !nogui
|
||||
//+build gui
|
||||
|
||||
package main
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//+build nogui
|
||||
//+build !gui
|
||||
|
||||
package main
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user