aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-01-29 21:07:06 +0100
committerMattias Andrée <m@maandree.se>2025-01-29 21:07:06 +0100
commitfde1d802203869236ae5678082626cca55f1f50d (patch)
tree8bd6f5c1ebbf8acd6932fe6f22abfe367dcd7de5 /Makefile
downloadnokeyrings-fde1d802203869236ae5678082626cca55f1f50d.tar.gz
nokeyrings-fde1d802203869236ae5678082626cca55f1f50d.tar.bz2
nokeyrings-fde1d802203869236ae5678082626cca55f1f50d.tar.xz
First commit
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f691e40
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+.POSIX:
+
+CONFIGFILE = config.mk
+include $(CONFIGFILE)
+
+OBJ =\
+ nokeyrings.o
+
+HDR =
+
+all: nokeyrings
+$(OBJ): $(HDR)
+
+.c.o:
+ $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
+
+nokeyrings: $(OBJ)
+ $(CC) -o $@ $(OBJ) $(LDFLAGS)
+
+install: nokeyrings
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
+ mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/"
+ cp -- nokeyrings "$(DESTDIR)$(PREFIX)/bin/"
+ cp -- nokeyrings.1 "$(DESTDIR)$(MANPREFIX)/man1/"
+
+post-install:
+ chown -- '0:0' "$(DESTDIR)$(PREFIX)/bin/nokeyrings"
+ chmod -- 4755 "$(DESTDIR)$(PREFIX)/bin/nokeyrings"
+
+uninstall:
+ -rm -f -- "$(DESTDIR)$(PREFIX)/bin/nokeyrings"
+ -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/nokeyrings.1"
+
+clean:
+ -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch *.gcov *.gcno *.gcda
+ -rm -f -- nokeyrings
+
+.SUFFIXES:
+.SUFFIXES: .o .c
+
+.PHONY: all install post-install uninstall clean