2020-04-21 15:22:31 +08:00
|
|
|
############################################################################
|
2019-01-28 02:16:02 +08:00
|
|
|
# fs/littlefs/Make.defs
|
2019-01-10 04:26:51 +08:00
|
|
|
#
|
2020-04-21 15:22:31 +08:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2019-01-10 04:26:51 +08:00
|
|
|
#
|
2020-04-21 15:22:31 +08:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2019-01-10 04:26:51 +08:00
|
|
|
#
|
2020-04-21 15:22:31 +08:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2019-01-10 04:26:51 +08:00
|
|
|
#
|
2020-04-21 15:22:31 +08:00
|
|
|
############################################################################
|
2019-01-10 04:26:51 +08:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_FS_LITTLEFS),y)
|
|
|
|
# Files required for littlefs file system support
|
|
|
|
|
2020-04-21 15:22:31 +08:00
|
|
|
CSRCS += lfs_vfs.c
|
2019-01-10 04:26:51 +08:00
|
|
|
|
|
|
|
DEPPATH += --dep-path littlefs
|
|
|
|
VPATH += :littlefs
|
|
|
|
|
2020-04-21 15:22:31 +08:00
|
|
|
CSRCS += lfs.c lfs_util.c
|
|
|
|
|
|
|
|
DEPPATH += --dep-path littlefs/littlefs
|
|
|
|
VPATH += :littlefs/littlefs
|
|
|
|
|
|
|
|
LITTLEFS_VERSION ?= 2.2.1
|
|
|
|
LITTLEFS_TARBALL = v$(LITTLEFS_VERSION).tar.gz
|
|
|
|
|
|
|
|
$(LITTLEFS_TARBALL):
|
|
|
|
$(Q) wget -P littlefs https://github.com/ARMmbed/littlefs/archive/$(LITTLEFS_TARBALL)
|
|
|
|
|
|
|
|
.littlefsunpack: $(LITTLEFS_TARBALL)
|
|
|
|
$(Q) tar zxf littlefs/$(LITTLEFS_TARBALL) -C littlefs
|
|
|
|
$(Q) mv littlefs/littlefs-$(LITTLEFS_VERSION) littlefs/littlefs
|
|
|
|
$(Q) touch littlefs/.littlefsunpack
|
|
|
|
|
|
|
|
context:: .littlefsunpack
|
|
|
|
|
|
|
|
distclean::
|
|
|
|
$(call DELFILE, littlefs/.littlefsunpack)
|
|
|
|
$(call DELFILE, littlefs/$(LITTLEFS_TARBALL))
|
|
|
|
$(call DELDIR, littlefs/littlefs)
|
|
|
|
|
2020-02-07 21:17:25 +08:00
|
|
|
endif
|