Write install, install-strip, and uninstall targets.

This commit is contained in:
2026-01-22 12:53:08 +01:00
parent 7ef3d16b53
commit bfc108bd78

View File

@@ -60,10 +60,19 @@ endif
.PHONY: .PHONY:
all: bin/$(NAME) bin/stripped_$(NAME) all: bin/$(NAME) bin/stripped_$(NAME)
# TODO: Compile libraries with `all` # Install a binary on a POSIX-compliant system.
# TODO: Write install recipe to install into DESTDIR, for UNIX® type systems, and Windows NT alongside uninstall recipes. .PHONY:
# TODO: Same goes for install-strip, which does the same, but with the stripped binary instead. install: bin/mcaselector-lite
# TODO: Include distclean which recompiles the libraries. install -m0755 bin/$(NAME) $(DESTDIR)/bin/$(NAME)
# Install a stripped binary on a POSIX-compliant system
.PHONY:
install-strip: bin/mcaselector-lite.stripped
install -m0755 bin/stripped_$(NAME) $(DESTDIR)/bin/$(NAME)
.PHONY:
uninstall:
$(RM) $(DESTDIR)/bin/$(NAME)
# Executes checks upon the code. # Executes checks upon the code.
# The standard requires code to already be built at this stage. # The standard requires code to already be built at this stage.