All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: alexandre.belloni@bootlin.com
Cc: linux-rtc@vger.kernel.org, Fabio Estevam <festevam@denx.de>
Subject: [PATCH rtc-tools] rtc-tools: Add a Makefile
Date: Sun, 23 Jan 2022 09:27:15 -0300	[thread overview]
Message-ID: <20220123122715.1300049-1-festevam@gmail.com> (raw)

From: Fabio Estevam <festevam@denx.de>

Add a Makefile to make installation and uninstallation
process easier.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 Makefile | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Makefile

diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000000..4f244d9289f1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,29 @@
+prefix ?= /usr
+bindir ?= $(prefix)/bin
+
+EXEC = rtc-range rtc rtc-sync
+
+all: $(EXEC)
+
+rtc-range: rtc-range.c
+	$(CC) $(CFLAGS) -o $@ rtc-range.c
+
+rtc: rtc.c
+	$(CC) $(CFLAGS) -o $@ rtc.c
+
+rtc-sync: rtc-sync.c
+	$(CC) $(CFLAGS) -o $@ rtc-sync.c
+
+clean:
+	rm -f $(EXEC)
+
+install: rtc-range rtc rtc-sync
+	mkdir -p '$(DESTDIR)$(bindir)'
+	install -m755 rtc-range '$(DESTDIR)$(bindir)/rtc-range'
+	install -m755 rtc '$(DESTDIR)$(bindir)/rtc'
+	install -m755 rtc-sync '$(DESTDIR)$(bindir)/rtc-sync'
+
+uninstall:
+	rm -rf '$(DESTDIR)$(bindir)/rtc-range'
+	rm -rf '$(DESTDIR)$(bindir)/rtc'
+	rm -rf '$(DESTDIR)$(bindir)/rtc-sync'
-- 
2.25.1


                 reply	other threads:[~2022-01-23 12:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220123122715.1300049-1-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=festevam@denx.de \
    --cc=linux-rtc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.