aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2024-03-12 11:14:15 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2024-03-12 11:14:15 -0700
commita88407d7924b0f45947807981cc8d3327d2c56d4 (patch)
treea249066d9018b7a87f45ae3904bc085da4c27bc8
parentfix: bump version to ship docs (diff)
downloadfifo-cronolog-a88407d7924b0f45947807981cc8d3327d2c56d4.tar.gz
fifo-cronolog-a88407d7924b0f45947807981cc8d3327d2c56d4.tar.bz2
fifo-cronolog-a88407d7924b0f45947807981cc8d3327d2c56d4.zip
build: add simple install targetv1.2.1
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3baecf8..7894e74 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,13 @@
CFLAGS += -Wall
BIN = fifo-cronolog
+HELPER = fifo-cronolog-setup
SRC = $(BIN).c
OBJ = $(patsubst %.c,%.o,$(SRC))
+BINDIR = /usr/sbin/
+SYSTEMD_TARGET = /usr/lib/systemd/system/
+SYSTEMD_UNIT = systemd/fifo-cronolog@.service
+
all: $(BIN)
$(BIN): $(OBJ)
@@ -14,4 +19,9 @@ $(BIN): $(OBJ)
clean:
$(RM) $(BIN) $(OBJ)
+install:
+ mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(SYSTEMD_TARGET)
+ install -m0755 -D $(BIN) $(HELPER) $(DESTDIR)$(BINDIR)
+ install -m0644 -D $(SYSTEMD_UNIT) $(DESTDIR)$(SYSTEMD_TARGET)
+
# vim: set ts=4 sw=4 tw=80: