-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcomponent.mk
60 lines (49 loc) · 1.44 KB
/
component.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
COMPONENT_DEPENDS := Storage
COMPONENT_SRCDIRS := \
src \
src/File \
src/FWFS \
src/HYFS \
src/Arch/$(SMING_ARCH)
COMPONENT_INCDIRS := \
src/include \
src/Arch/$(SMING_ARCH)/include
ifeq ($(SMING_ARCH),Host)
ifeq ($(UNAME),Windows)
EXTRA_LIBS += ntdll
COMPONENT_SRCDIRS += src/Arch/Host/Windows
endif
endif
COMPONENT_VARS := ENABLE_FILE_SIZE64
ifeq ($(ENABLE_FILE_SIZE64),1)
ENABLE_STORAGE_SIZE64 := 1
# Check user didn't override this on command line
ifneq ($(ENABLE_STORAGE_SIZE64),1)
$(error ENABLE_FILE_SIZE64 requires ENABLE_STORAGE_SIZE64=1)
endif
GLOBAL_CFLAGS += -DENABLE_FILE_SIZE64
endif
COMPONENT_DOCFILES := tools/fsbuild/README.rst
COMPONENT_DOXYGEN_INPUT := src
# Extended debug information level
COMPONENT_RELINK_VARS += FWFS_DEBUG
FWFS_DEBUG ?= 0
COMPONENT_CXXFLAGS += -DFWFS_DEBUG=$(FWFS_DEBUG)
##@Building
HWCONFIG_BUILDSPECS += $(COMPONENT_PATH)/build.json
DEBUG_VARS += FSBUILD
FSBUILD_PATH := $(COMPONENT_PATH)/tools/fsbuild/fsbuild.py
FSBUILD := $(PYTHON) $(FSBUILD_PATH) $(if $V,--verbose -l -)
CACHE_VARS += FSBUILD_OPTIONS
FSBUILD_OPTIONS ?=
# Target invoked via partition table
ifneq (,$(filter fwfs-build,$(MAKECMDGOALS)))
PART_TARGET := $(PARTITION_$(PART)_FILENAME)
ifneq (,$(PART_TARGET))
$(eval PART_CONFIG := $(call HwExpr,part.build['config']))
.PHONY: fwfs-build
fwfs-build:
@echo "Creating FWFS image '$(PART_TARGET)'"
$(Q) $(FSBUILD) $(FSBUILD_OPTIONS) -i "$(subst ",\",$(PART_CONFIG))" -o $(PART_TARGET)
endif
endif