diff --git a/pkg/littlefs2/Makefile.dep b/pkg/littlefs2/Makefile.dep index 46de66a114..f0202d4006 100644 --- a/pkg/littlefs2/Makefile.dep +++ b/pkg/littlefs2/Makefile.dep @@ -1,5 +1,9 @@ -USEMODULE += vfs -USEMODULE += littlefs2_fs -USEMODULE += mtd +DEFAULT_MODULE += littlefs2_fs + +# require littlefs2_fs dependencies if this module isn't disabled +ifeq (,$(filter littlefs2_fs,$(DISABLE_MODULE))) + USEMODULE += vfs + USEMODULE += mtd +endif FEATURES_BLACKLIST += arch_msp430 diff --git a/pkg/littlefs2/Makefile.include b/pkg/littlefs2/Makefile.include index f7398fb4ef..51511c6d2f 100644 --- a/pkg/littlefs2/Makefile.include +++ b/pkg/littlefs2/Makefile.include @@ -1,6 +1,8 @@ INCLUDES += -I$(PKGDIRBASE)/littlefs2 -DIRS += $(RIOTBASE)/pkg/littlefs2/fs +ifneq (,$(filter littlefs2_fs,$(USEMODULE))) + DIRS += $(RIOTBASE)/pkg/littlefs2/fs +endif # Reduce LFS_NAME_MAX to 31 (as VFS_NAME_MAX default) CFLAGS += -DLFS_NAME_MAX=31