wayshot/Makefile

28 lines
592 B
Makefile
Raw Permalink Normal View History

2023-07-06 19:14:45 +02:00
BINARY := wayshot
BUILDFLAGS := --release
2023-07-06 19:28:17 +02:00
TARGET_DIR := $(DESTDIR)/usr/bin
2023-07-06 19:14:45 +02:00
SOURCE_DIR := ./target/release
MAN1_DIR := /usr/share/man/man1
MAN7_DIR := /usr/share/man/man7
all: build
build:
@cargo build $(BUILDFLAGS)
run:
@cargo run
install: build
@mkdir -p $(TARGET_DIR)
@cp $(SOURCE_DIR)/$(BINARY) $(TARGET_DIR)
@chmod +x $(TARGET_DIR)/$(BINARY)
@find ./docs -type f -iname "*.1.gz" -exec cp {} $(MAN1_DIR) \;
@find ./docs -type f -iname "*.7.gz" -exec cp {} $(MAN7_DIR) \;
uninstall:
@rm -f $(TARGET_DIR)/$(BINARY)
@rm -f /usr/share/man/**/wayshot.*
2023-07-06 19:23:14 +02:00
.PHONY: all install build