aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-11-02 19:16:28 +0100
committerMattias Andrée <m@maandree.se>2026-11-02 19:16:28 +0100
commitec7bbbf0a56ceebd4ec763360520acd2c16e24c2 (patch)
tree0e1540cf792960ae49587564db7bc7a38fa10cf9 /Makefile
downloadfsshield-master.tar.gz
fsshield-master.tar.bz2
fsshield-master.tar.xz
First commitHEAD1.0master
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..77dae54
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,44 @@
+.POSIX:
+
+CONFIGFILE = config.mk
+include $(CONFIGFILE)
+
+OBJ =\
+ fsshield.o
+
+HDR =
+
+
+all: fsshield
+$(OBJ): $(HDR)
+
+.c.o:
+ $(CC) -c -o $@ $< $(CFLAGS) $(GOV_CFLAGS) $(CPPFLAGS) $(GOV_CPPFLAGS)
+
+fsshield: $(OBJ)
+ $(CC) -o $@ $(OBJ) $(LDFLAGS) $(COV_LDFLAGS)
+ $(BUILD_SUDO) sh -c 'chown -- 0:0 $@ && chmod -- 4755 $@'
+
+install: fsshield
+ mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
+ mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1/"
+ cp -- fsshield "$(DESTDIR)$(PREFIX)/bin/"
+ cp -- fsshield.1 "$(DESTDIR)$(MANPREFIX)/man1/"
+
+post-install:
+ chown -- '0:0' "$(DESTDIR)$(PREFIX)/bin/fsshield"
+ chmod -- 4755 "$(DESTDIR)$(PREFIX)/bin/fsshield"
+
+uninstall:
+ -rm -f -- "$(DESTDIR)$(PREFIX)/bin/fsshield"
+ -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/fsshield.1"
+
+clean:
+ -rm -f -- *.o *.a *.lo *.su *.so *.so.* *.gch
+ -rm -f -- *.gcov *.gcno *.gcda *.t *.to *.f *.fo
+ -rm -f -- fsshield
+
+.SUFFIXES:
+.SUFFIXES: .o .c
+
+.PHONY: all install uninstall post-install clean