Updated Makefile.
This commit is contained in:
parent
470b371503
commit
40d18b0a17
12
Makefile
12
Makefile
@ -6,21 +6,21 @@ SYSDDIR=${SYSDDIR_:/%=%}
|
|||||||
DESTDIR:=
|
DESTDIR:=
|
||||||
PREFIX:=/usr/local
|
PREFIX:=/usr/local
|
||||||
|
|
||||||
VERSION=23.32.0
|
VERSION=24.49.0
|
||||||
|
|
||||||
FLAGS=-buildmode=pie -modcacherw -mod=readonly -trimpath
|
FLAGS=-buildmode=pie -modcacherw -mod=readonly -trimpath
|
||||||
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}" -tags osusergo,netgo
|
LDFLAGS=-ldflags "-s -w -X main.version=${VERSION}" -tags osusergo,netgo
|
||||||
|
|
||||||
.PHONY: run install uninstall clean
|
.PHONY: run install uninstall clean
|
||||||
|
|
||||||
${TARGET}: web/*.jade.go
|
${TARGET}: web/*_templ.go
|
||||||
go build -o bin/$@ ${LDFLAGS} ${FLAGS} cmd/$@/main.go
|
go build -o bin/$@ ${LDFLAGS} ${FLAGS} cmd/$@/main.go
|
||||||
|
|
||||||
web/*.jade.go: web/templates/*.jade
|
web/*_templ.go: web/*.templ
|
||||||
ifeq (,$(wildcard $(shell go env GOPATH)/bin/jade))
|
ifeq (,$(wildcard $(shell go env GOPATH)/bin/templ))
|
||||||
go install github.com/Joker/jade/cmd/jade@latest
|
go install github.com/a-h/templ/cmd/templ@latest
|
||||||
endif
|
endif
|
||||||
go generate web/web.go
|
$(shell go env GOPATH)/bin/templ generate
|
||||||
|
|
||||||
run:
|
run:
|
||||||
bin/${TARGET} -file-handling -path /mnt/data -listen 127.0.0.1:19135
|
bin/${TARGET} -file-handling -path /mnt/data -listen 127.0.0.1:19135
|
||||||
|
Loading…
Reference in New Issue
Block a user