summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorB. Bergeron <[email protected]>2025-07-16 00:17:00 -0400
committerB. Bergeron <[email protected]>2025-07-16 00:17:00 -0400
commit4addcd2a4163f0767ec1ed696ac7eae49d55c8ff (patch)
treeef6de2ca3c851fa41c51ba0e85b5f8c1bb71347b /Makefile
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4056a22
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+# run_landlock - execute a command in landlock
+# See LICENSE file for copyright and license details.
+.POSIX:
+
+include config.mk
+
+all: run_landlock
+
+run_landlock: run_landlock.c
+ $(CC) $(CFLAGS) $^ -o $@
+
+clean:
+ rm run_landlock
+
+install: run_landlock
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp -f run_landlock $(DESTDIR)$(PREFIX)/bin
+ chmod 4755 $(DESTDIR)$(PREFIX)/bin/run_landlock
+ mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ sed "s/VERSION/$(VERSION)/g" < run_landlock.1 > $(DESTDIR)$(MANPREFIX)/man1/mntrun.1
+ chmod 644 $(DESTDIR)$(MANPREFIX)/man1/run_landlock.1
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/run_landlock
+ rm -f $(DESTDIR)$(MANPREFIX)/man1/run_landlock.1
+
+.PHONY: all clean install uninstall