aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-08-30 17:09:39 +0200
committerMattias Andrée <maandree@kth.se>2021-08-30 17:13:35 +0200
commitd9b6fe8028a94149c9e869039b1ad9dc6fd2f982 (patch)
treeaac212247091da8f5b1743dbc11c0e8f1891546c /Makefile
downloadeditasroot-d9b6fe8028a94149c9e869039b1ad9dc6fd2f982.tar.gz
editasroot-d9b6fe8028a94149c9e869039b1ad9dc6fd2f982.tar.bz2
editasroot-d9b6fe8028a94149c9e869039b1ad9dc6fd2f982.tar.xz
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile42
1 files changed, 42 insertions, 0 deletions
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