2025-05-08 18:54:23 +01:00
|
|
|
SOURCES=*.go
|
|
|
|
|
LINKER_FLAGS=-X main.OwlVersion=`git describe --tags --dirty`
|
2025-07-22 11:07:09 +01:00
|
|
|
INSTALL_DIR=${HOME}/.local
|
2025-05-28 12:27:19 +01:00
|
|
|
|
2025-05-08 18:54:23 +01:00
|
|
|
owl: ${SOURCES}
|
|
|
|
|
go build -o owl -ldflags "${LINKER_FLAGS}" -- ${SOURCES}
|
2025-07-22 11:07:09 +01:00
|
|
|
|
2025-05-08 18:54:23 +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
|
|
|
|
2025-05-08 18:54:23 +01:00
|
|
|
build: owl owl.1
|
2025-07-22 11:07:09 +01:00
|
|
|
|
2025-05-15 12:16:10 +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
|
|
|
|
|
|
2025-05-28 12:27:19 +01:00
|
|
|
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
|
2025-05-28 12:27:19 +01:00
|
|
|
|
|
|
|
|
.PHONY: build test install uninstall
|