Updated Makefile.
This commit is contained in:
parent
4cc8b0c761
commit
f59da2a76e
14
Makefile
14
Makefile
@ -2,18 +2,22 @@ TARGET=dwelling-home
|
||||
|
||||
SYSDDIR_=${shell pkg-config systemd --variable=systemdsystemunitdir}
|
||||
SYSDDIR=${SYSDDIR_:/%=%}
|
||||
DESTDIR:=
|
||||
PREFIX:=/usr/local
|
||||
|
||||
DESTDIR?=
|
||||
PREFIX?=/usr/local
|
||||
|
||||
VERSION?=24.27.1
|
||||
|
||||
FLAGS:=-buildmode=pie -modcacherw -mod=readonly -trimpath
|
||||
LDFLAGS=-ldflags "-s -w -X 'git.arav.su/Arav/dwelling-home/internal/version.ver=v${VERSION}'" -tags osusergo,netgo
|
||||
XVER:=git.arav.su/Arav/dwelling-home/internal/version.ver=v${VERSION}
|
||||
|
||||
GOFLAGS:=-buildmode=pie -trimpath -mod=readonly -modcacherw
|
||||
GOFLAGS+=-ldflags="-linkmode=external -s -w -X '${XVER}' -extldflags=${LDFLAGS}"
|
||||
GOFLAGS+=-tags osusergo,netgo
|
||||
|
||||
.PHONY: run install uninstall clean
|
||||
|
||||
${TARGET}: web/*_templ.go
|
||||
go build -o bin/$@ ${LDFLAGS} ${FLAGS} cmd/$@/main.go
|
||||
go build ${GOFLAGS} -o bin/$@ cmd/$@/main.go
|
||||
|
||||
web/*_templ.go: web/*.templ
|
||||
ifeq (,$(wildcard $(shell go env GOPATH)/bin/templ))
|
||||
|
Loading…
Reference in New Issue
Block a user