aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-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: