aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/shutdown/Makefile
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-02-24 00:17:26 +0100
committerMiquel Sabaté Solà <mssola@mssola.com>2026-02-24 00:17:26 +0100
commita597bc04de8990dc66e9641c782d6a9fc80a5abe (patch)
tree75b3e4c47aabfc3a3d3c49db26f5010c911ba37e /fs/btrfs/shutdown/Makefile
parent7a721c4374f192ba025b27f790cf14339ca2088e (diff)
downloadfarga-a597bc04de8990dc66e9641c782d6a9fc80a5abe.tar.gz
farga-a597bc04de8990dc66e9641c782d6a9fc80a5abe.zip
btrfs: add examples on the shutdown experimental feature
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'fs/btrfs/shutdown/Makefile')
-rw-r--r--fs/btrfs/shutdown/Makefile56
1 files changed, 56 insertions, 0 deletions
diff --git a/fs/btrfs/shutdown/Makefile b/fs/btrfs/shutdown/Makefile
new file mode 100644
index 0000000..8871afd
--- /dev/null
+++ b/fs/btrfs/shutdown/Makefile
@@ -0,0 +1,56 @@
+##
+# By default everything is silent. If you want to change this behavior, simply
+# assign V=1 when calling make.
+
+V =
+ifeq ($(strip $(V)),)
+ E = @echo
+ Q = @
+else
+ E = @\#
+ Q =
+endif
+
+##
+# Compile options. You can use CROSS_COMPILE just like on the Linux Kernel.
+
+CC = $(CROSS_COMPILE)gcc
+LD = $(CROSS_COMPILE)ld
+CCFLAGS = -Werror -Wpedantic -Wall -Wextra -Wcast-qual -Winit-self \
+ -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-conversion \
+ -Wswitch-default -Wundef -Wunreachable-code -Wmissing-noreturn \
+ -D_FORTIFY_SOURCE=3 -fstrict-flex-arrays=3 -fsanitize=bounds-strict
+ # NOTE: last line: special flags for the examples :)
+LDFLAGS =
+
+
+# You can pass an optional `DEBUG` variable to manipulate the build type.
+DEBUG =
+ifeq ($(strip $(DEBUG)),)
+ CCFLAGS += -O3
+else
+ CCFLAGS += -g
+endif
+
+##
+# Paths.
+
+SRC = $(wildcard *.c)
+EXES = $(SRC:.c=)
+
+##
+# Targets
+
+.PHONY: all
+all: clean $(EXES)
+
+.PHONY: build
+build: $(EXES)
+
+.c:
+ $(E) " CC " $(*F)
+ $(Q) $(CC) $(CCFLAGS) $< -o $@
+
+.PHONY: clean
+clean:
+ $(Q) rm -f $(EXES)