summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..482c429
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+DESTDIR =
+BINDIR = /usr/bin
+LIBDIR = /usr/lib
+
+VERSION = 0.0
+
+all: reboot-if-no-net-connection
+
+%: %.in
+ sed " \
+ s/#VERSION#/$(VERSION)/; \
+ " $< > $@
+ [ "$@" = "reboot-if-no-net-connection" ] && chmod +x "$@" || true
+
+.PHONY: install
+
+install: all
+ install -D -m0755 -t $(DESTDIR)$(BINDIR) reboot-if-no-net-connection
+ install -D -m0644 -t $(DESTDIR)$(LIBDIR)/systemd/system reboot-if-no-net-connection.service reboot-if-no-net-connection.timer