diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 19 insertions, 14 deletions
@@ -6,21 +6,26 @@ CARGO ?= cargo SCDOC ?= scdoc RM ?= rm +man_targets = man/rs.1 + +.PHONY: default default: @${CARGO} build -release: + +man/rs.%: + @${SCDOC} < $@.scd > $@ + +target/release/rs: + @echo Building default target @${CARGO} build --release --locked --all-features --target-dir=target -manpage: - @${SCDOC} < man/rs.1.scd > man/rs.1 -install: release manpage - install -Dm 755 -t "${BIN_DEST}" target/release/rs - install -Dm 555 -t "${MAN_DEST}" man/rs.1 - -run: - @${CARGO} run -fmt: - @${CARGO} fmt -clean: - @${RM} man/rs.1 - @${CARGO} clean + +target/%/release/rs: + @echo Building target $* + @${CARGO} build --target $* --release --locked --all-features --target-dir=target + +musl: target/x86_64-unknown-linux-musl/release/rs + strip target/x86_64-unknown-linux-musl/release/rs + @${CARGO} run --target x86_64-unknown-linux-musl --release +test-musl: + @${CARGO} test --target x86_64-unknown-linux-musl --release --locked --all-features --target-dir=target |