Updated Makefile.
This commit is contained in:
parent
470b371503
commit
40d18b0a17
12
Makefile
12
Makefile
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user