default: all

MODULES := ldiskfs

# copy makefile over to not break patches
backfs_extra := $(wildcard /home/green/bk/linux-4.18.0-348.7.1.el8_5-debug/fs/ext4/Makefile)

backfs_headers := $(wildcard /home/green/bk/linux-4.18.0-348.7.1.el8_5-debug/fs/ext4/*.h)
linux_headers := $(wildcard /home/green/bk/linux-4.18.0-348.7.1.el8_5-debug/include/linux/ext4*.h)
linux_new_headers := htree_lock.h
trace_headers := $(wildcard /home/green/bk/linux-4.18.0-348.7.1.el8_5-debug/include/trace/events/ext4*.h)

backfs_sources := $(filter-out %.mod.c %/inode-test.c ,$(wildcard /home/green/bk/linux-4.18.0-348.7.1.el8_5-debug/fs/ext4/*.c))

new_sources := mmp.c htree_lock.c critical_encode.h encdata.h
new_headers :=

ldiskfs_patched_sources := $(notdir $(backfs_sources) $(backfs_headers)) $(new_sources) $(new_headers)
ldiskfs_sources := $(ldiskfs_patched_sources)

ldiskfs-objs := $(filter %.o,$(ldiskfs_sources:.c=.o))

EXTRA_PRE_CFLAGS := -I/home/green/bk/linux-4.18.0-348.7.1.el8_5-debug/fs -I/home/green/git/lustre-release/ldiskfs

include /home/green/git/lustre-release/Rules
