summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-18 22:24:27 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-18 22:24:27 -0500
commit58861a7cbcd8f745ec0cc99e7dced13da07eff68 (patch)
treeb83769fe0fe6b72d13a6de2c7b833d6946fe63ca /Makefile
initial commit
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 $< $@