From 24bc0b6f16245c114f52fd769c72f3c666a5edd8 Mon Sep 17 00:00:00 2001 From: CapCreeperGR Date: Mon, 6 May 2024 14:56:29 +0300 Subject: [PATCH] Added BINDIR and SYSCONFDIR variables to the Makefile --- Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1d1bb64..1a809a2 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,22 @@ ifeq ($(PREFIX),) PREFIX := /usr/local endif +ifeq ($(BINDIR),) + BINDIR := $(PREFIX)/bin +endif +ifeq ($(SYSCONFDIR),) + SYSCONFDIR := $(PREFIX)/etc +endif build: mkdir -p build go build -o build/stormfetch stormfetch install: build/stormfetch config/ - mkdir -p $(DESTDIR)$(PREFIX)"/bin/" - mkdir -p $(DESTDIR)$(PREFIX)"/etc/stormfetch/" - cp build/stormfetch $(DESTDIR)$(PREFIX)"/bin/stormfetch" - cp -r config/. $(DESTDIR)$(PREFIX)"/etc/stormfetch/" + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(SYSCONFDIR)"/stormfetch/" + cp build/stormfetch $(DESTDIR)$(BINDIR)"/stormfetch" + cp -r config/. $(DESTDIR)$(SYSCONFDIR)"/stormfetch/" clean: rm -r build/ \ No newline at end of file