1
0

Updated Makefile.

This commit is contained in:
Alexander Andreev 2024-12-08 04:14:09 +04:00
parent 470b371503
commit 40d18b0a17
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -6,21 +6,21 @@ SYSDDIR=${SYSDDIR_:/%=%}
DESTDIR:=
PREFIX:=/usr/local
VERSION=23.32.0
VERSION=24.49.0
FLAGS=-buildmode=pie -modcacherw -mod=readonly -trimpath
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}" -tags osusergo,netgo
.PHONY: run install uninstall clean
${TARGET}: web/*.jade.go
${TARGET}: web/*_templ.go
go build -o bin/$@ ${LDFLAGS} ${FLAGS} cmd/$@/main.go
web/*.jade.go: web/templates/*.jade
ifeq (,$(wildcard $(shell go env GOPATH)/bin/jade))
go install github.com/Joker/jade/cmd/jade@latest
web/*_templ.go: web/*.templ
ifeq (,$(wildcard $(shell go env GOPATH)/bin/templ))
go install github.com/a-h/templ/cmd/templ@latest
endif
go generate web/web.go
$(shell go env GOPATH)/bin/templ generate
run:
bin/${TARGET} -file-handling -path /mnt/data -listen 127.0.0.1:19135