Files

26 lines
536 B
Makefile

PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man/man1
.PHONY: all build install clean help
all: build
build:
cargo build --release
install: build
install -d $(BINDIR)
install -m 755 target/release/sized $(BINDIR)/sized
install -d $(MANDIR)
install -m 644 sized.1 $(MANDIR)/sized.1
clean:
cargo clean
help:
@echo "Usage:"
@echo " make build - Build the optimized binary"
@echo " make install - Install binary and man page (may require sudo)"
@echo " make clean - Remove build artifacts"