From bdb52c62902f09c7c04e8896165b7c98c3fbf362 Mon Sep 17 00:00:00 2001 From: Nika Krasnova Date: Sun, 31 May 2026 17:03:41 +0200 Subject: [PATCH] Add install and uninstall targets to Makefile --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 0ebcae9..5ddac0c 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,22 @@ BINS := bmfdec bmfparse bmf2mof +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin +INSTALL ?= install + all: $(BINS) clean: $(RM) $(BINS) +install: $(BINS) + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) -m755 $(BINS) $(DESTDIR)$(BINDIR) + +uninstall: + $(RM) $(addprefix $(DESTDIR)$(BINDIR)/,$(BINS)) + %: %.c $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ + +.PHONY: all clean install uninstall