summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..282ed1a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+files.out.all += systemd-timesyncd-wait systemd-timesyncd-wrap
+files.sys.all += /usr/lib/systemd/systemd-timesyncd-wait
+files.sys.all += /usr/lib/systemd/systemd-timesyncd-wrap
+files.sys.all += /usr/lib/systemd/system/systemd-timesyncd-wait.socket
+files.sys.all += /usr/lib/systemd/system/systemd-timesyncd-wait.service
+files.sys.all += /usr/lib/systemd/system/systemd-timesyncd.service.d/wait.conf
+
+outdir = .
+srcdir = .
+all: $(addprefix $(outdir)/,$(files.out.all))
+clean:
+ rm -f -- $(addprefix $(outdir)/,$(files.out.all))
+install: $(addprefix $(DESTDIR),$(files.sys.all))
+.PHONY: all clean install
+
+$(outdir)/%: $(srcdir)/%.go
+ go build -o $@ $<
+
+$(DESTDIR)/usr/lib/systemd/%: $(outdir)/%
+ install -DTm755 $< $@
+$(DESTDIR)/usr/lib/systemd/system/%: $(srcdir)/%
+ install -DTm644 $< $@
+$(DESTDIR)/usr/lib/systemd/system/systemd-timesyncd.service.d/wait.conf: systemd-timesyncd.service.d-wait.conf
+ install -DTm644 $< $@