You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
phetch/Makefile

39 lines
817 B
Makefile

# Simple, stupid makefile to make phetch
PHETCH_RELEASE = target/release/phetch
PHETCH_DEBUG = target/debug/phetch
4 years ago
RSFILES = $(wildcard src/*.rs src/**/*.rs)
4 years ago
.PHONY: release debug clean
# Default target
4 years ago
release: manual $(PHETCH_RELEASE)
# Binary with debugging info
debug: $(PHETCH_DEBUG)
4 years ago
# Remove the release directory and its contents
clean:
4 years ago
@rm -rf target
# Build and strip the release version
$(PHETCH_RELEASE): $(RSFILES)
cargo build --release
strip $@
# Build the debug version
$(PHETCH_DEBUG): $(RSFILES)
cargo build
4 years ago
# Build manual
manual: doc/phetch.1
doc/phetch.1: doc/phetch.1.md scdoc
scdoc < doc/phetch.1.md > doc/phetch.1
# Must have scdoc installed to build manual.
scdoc:
@which scdoc || (echo "scdoc(1) not found."; \
echo "install it: https://repology.org/project/scdoc"; exit 1)