From d9b6fe8028a94149c9e869039b1ad9dc6fd2f982 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 30 Aug 2021 17:09:39 +0200 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3b51433 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +.POSIX: + +CONFIGFILE = config.mk +include $(CONFIGFILE) + +OBJ =\ + editasroot.o\ + copier.o + +all: editasroot copier +$(OBJ): $(@:.o=.c) + +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +editasroot: editasroot.o + $(CC) -o $@ $@.o $(LDFLAGS) + +copier: copier.o + $(CC) -o $@ $@.o $(LDFLAGS) + +install: editasroot copier + mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" + mkdir -p -- "$(DESTDIR)$(LIBEXECDIR)" + mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man8/" + cp -- editasroot "$(DESTDIR)$(PREFIX)/bin/" + cp -- editasroot.1 "$(DESTDIR)$(MANPREFIX)/man8/" + cp -- copier "$(DESTDIR)$(LIBEXECDIR)/" + +uninstall: + -rm -f -- "$(DESTDIR)$(PREFIX)/bin/editasroot" + -rm -f -- "$(DESTDIR)$(LIBEXECDIR)/editasroot-copier" + -rm -f -- "$(DESTDIR)$(MANPREFIX)/man8/editasroot.8" + +clean: + -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch *.gcov *.gcno *.gcda + -rm -f -- editasroot copier + +.SUFFIXES: +.SUFFIXES: .o .c + +.PHONY: all install uninstall clean -- cgit v1.2.3-70-g09d2