owl/Makefile

27 lines
624 B
Makefile
Raw Permalink Normal View History

SOURCES=*.go
LINKER_FLAGS=-X main.OwlVersion=`git describe --tags --dirty`
2025-07-22 11:07:09 +01:00
INSTALL_DIR=${HOME}/.local
owl: ${SOURCES}
go build -o owl -ldflags "${LINKER_FLAGS}" -- ${SOURCES}
2025-07-22 11:07:09 +01:00
owl.1: man.md
pandoc -s --shift-heading-level-by=-1 --to=man man.md > owl.1
2025-07-22 11:07:09 +01:00
build: owl owl.1
2025-07-22 11:07:09 +01:00
test: *.go
go test -v .
2025-07-22 11:07:09 +01:00
install:
install -m 0755 -D owl ${INSTALL_DIR}/bin/owl
install -m 0644 -D owl.1 ${INSTALL_DIR}/man/man1/owl.1
install -m 0644 -D LICENSE ${INSTALL_DIR}/share/doc/LICENSE
uninstall:
2025-07-22 11:07:09 +01:00
rm -I ${INSTALL_DIR}/bin/owl \
${INSTALL_DIR}/man/man1/owl.1 \
${INSTALL_DIR}/share/doc/LICENSE
.PHONY: build test install uninstall