diff options
author | Damien George <damien.p.george@gmail.com> | 2019-11-07 18:27:51 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-11-11 11:37:38 +1100 |
commit | 799b6d1e0c5bfb2392b7978f549ab2c7d2e0cc29 (patch) | |
tree | 7f82f744f693e21b60e3486cd9c38f7ba66d3438 /extmod/extmod.mk | |
parent | 1266ba97545b66c93e33a2d4c4e665cdbd14228c (diff) |
extmod: Consolidate FAT FS config to MICROPY_VFS_FAT across all ports.
This commit removes the Makefile-level MICROPY_FATFS config and moves the
MICROPY_VFS_FAT config to the Makefile level to replace it. It also moves
the include of the oofatfs source files in the build from each port to a
central place in extmod/extmod.mk.
For a port to enabled VFS FAT support it should now set MICROPY_VFS_FAT=1
at the level of the Makefile. This will include the relevant oofatfs files
in the build and set MICROPY_VFS_FAT=1 at the C (preprocessor) level.
Diffstat (limited to 'extmod/extmod.mk')
-rw-r--r-- | extmod/extmod.mk | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/extmod/extmod.mk b/extmod/extmod.mk index e714b6028..69d8cfad3 100644 --- a/extmod/extmod.mk +++ b/extmod/extmod.mk @@ -1,7 +1,20 @@ # This makefile fragment provides rules to build 3rd-party components for extmod modules +################################################################################ +# VFS FAT FS + +OOFATFS_DIR = lib/oofatfs + # this sets the config file for FatFs -CFLAGS_MOD += -DFFCONF_H=\"lib/oofatfs/ffconf.h\" +CFLAGS_MOD += -DFFCONF_H=\"$(OOFATFS_DIR)/ffconf.h\" + +ifeq ($(MICROPY_VFS_FAT),1) +CFLAGS_MOD += -DMICROPY_VFS_FAT=1 +SRC_MOD += $(addprefix $(OOFATFS_DIR)/,\ + ff.c \ + ffunicode.c \ + ) +endif ################################################################################ # VFS littlefs |