From: Fabio Estevam <festevam@xxxxxxx> Add a Makefile to make installation and uninstallation process easier. Signed-off-by: Fabio Estevam <festevam@xxxxxxx> --- 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