commit cae73b002271e0bf90f4e88c396e06c0dafab1b4 parent 35ffd0d929b3a94da3a565d3641af3a0cf75c9a8 Author: Louis Burda <quent.burda@gmail.com> Date: Wed, 28 Sep 2022 01:52:08 +0200 Add install and uninstall targets Diffstat:
M | Makefile | | | 12 | ++++++++++-- |
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile @@ -1,7 +1,7 @@ -CFLAGS = LDLIBS = -lX11 -lcairo -.PHONY: all clean +PREFIX ?= /usr/local +BINDIR ?= /bin all: overdraw @@ -10,3 +10,11 @@ clean: overdraw: overdraw.c $(CC) -o $@ $^ $(CFLAGS) $(LDLIBS) + +install: overdraw + install -m755 overdraw -T "$(DESTDIR)$(PREFIX)$(BINDIR)/overdraw" + +uninstall: + rm "$(DESTDIR)$(PREFIX)$(BINDIR)/overdraw" + +.PHONY: all clean install uninstall