-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ftpm #7054
Ftpm #7054
Changes from all commits
c4c22f0
9e9a472
472fcb2
f9f61da
d9517f8
2d6d835
bace052
e282593
aaf5a95
9fa7212
67d099e
aed2671
2d8527f
fd99d4a
6b902d4
b0dfcf8
d0dcb63
d5f77af
10a516e
ab498ff
fee31fc
052109c
d6bdcf5
85d1819
4b7e1e6
b0a3d15
6b5c2d0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,33 +23,18 @@ asm-defines-files := | |
|
||
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) | ||
|
||
define process-subdir-srcs-y | ||
ifeq ($$(sub-dir),.) | ||
srcs += $1 | ||
oname := $(out-dir)/$(base-prefix)$(basename $1).o | ||
else | ||
ifneq ($(filter /%,$(1)),) | ||
# $1 is an absolute path - start with "/" | ||
srcs += $1 | ||
oname := $(out-dir)/$(base-prefix)$(basename $1).o | ||
else | ||
srcs += $(sub-dir)/$1 | ||
oname := $(out-dir)/$(base-prefix)$(basename $$(sub-dir)/$1).o | ||
endif | ||
endif | ||
cflags-$$(oname) := $$(cflags-y) $$(cflags-$(1)-y) | ||
cflags-remove-$$(oname) := $$(cflags-remove-y) \ | ||
$$(cflags-remove-$(1)-y) | ||
cxxflags-$$(oname) := $$(cxxflags-y) $$(cxxflags-$(1)-y) | ||
cxxflags-remove-$$(oname) := $$(cxxflags-remove-y) \ | ||
$$(cxxflags-remove-$(1)-y) | ||
cppflags-$$(oname) := $$(cppflags-y) $$(cppflags-$(1)-y) | ||
cppflags-remove-$$(oname) := $$(cppflags-remove-y) \ | ||
$$(cppflags-remove-$(1)-y) | ||
aflags-$$(oname) := $$(aflags-y) $$(aflags-$(1)-y) | ||
aflags-remove-$$(oname) := $$(aflags-remove-y) \ | ||
$$(aflags-remove-$(1)-y) | ||
incdirs-$$(oname) := $$(thissubdir-incdirs) $$(addprefix $(sub-dir)/,$$(incdirs-$(1)-y)) | ||
define process-file-vars-helper | ||
# $1 is local source file name | ||
# $2 is output file name | ||
cflags-$(2) := $$(cflags-y) $$(cflags-$(1)-y) | ||
cflags-remove-$(2) := $$(cflags-remove-y) $$(cflags-remove-$(1)-y) | ||
cxxflags-$(2) := $$(cxxflags-y) $$(cxxflags-$(1)-y) | ||
cxxflags-remove-$(2) := $$(cxxflags-remove-y) $$(cxxflags-remove-$(1)-y) | ||
cppflags-$(2) := $$(cppflags-y) $$(cppflags-$(1)-y) | ||
cppflags-remove-$(2) := $$(cppflags-remove-y) $$(cppflags-remove-$(1)-y) | ||
aflags-$(2) := $$(aflags-y) $$(aflags-$(1)-y) | ||
aflags-remove-$(2) := $$(aflags-remove-y) $$(aflags-remove-$(1)-y) | ||
incdirs-$(2) := $$(thissubdir-incdirs) $$(addprefix $(sub-dir)/,$$(incdirs-$(1)-y)) | ||
# Clear local filename specific variables to avoid accidental reuse | ||
# in another subdirectory | ||
cflags-$(1)-y := | ||
|
@@ -64,8 +49,44 @@ cppflags-lib-y := | |
aflags-$(1)-y := | ||
aflags-remove-$(1)-y := | ||
incdirs-$(1)-y := | ||
fname := | ||
oname := | ||
endef #process-file-vars-helper | ||
|
||
define process-file-vars | ||
# $1 is local source file name | ||
# $2 is output file name | ||
# $3 is tree source file name | ||
oname-$(sm)-$3 := $$(if $$(oname-$1-y),$(out-dir)/$(base-prefix)/$$(oname-$1-y),$2) | ||
$$(eval $$(call process-file-vars-helper,$1,$$(oname-$(sm)-$3))) | ||
endef | ||
|
||
define process-subdir-srcs-y | ||
ifeq ($$(sub-dir),.) | ||
srcs += $1 | ||
fname := $1 | ||
oname := $(out-dir)/$(base-prefix)$(basename $1).o | ||
else | ||
ifneq ($(filter /%,$(1)),) | ||
# $1 is an absolute path - start with "/" | ||
srcs += $1 | ||
fname := $1 | ||
oname := $(out-dir)/$(base-prefix)$(basename $1).o | ||
else | ||
srcs += $(sub-dir)/$1 | ||
fname := $(sub-dir)/$1 | ||
oname := $(out-dir)/$(base-prefix)$(basename $$(sub-dir)/$1).o | ||
endif | ||
endif | ||
$$(eval $$(call process-file-vars,$1,$$(oname),$$(fname))) | ||
endef #process-subdir-srcs-y | ||
|
||
define process-subdir-srcs_ext-y | ||
ifneq ($(filter /%,$(1)),) | ||
$$(error Absolute path not supported for srcs_ext-y: $(1)) | ||
endif | ||
srcs += $2/$1 | ||
fname := $2/$1 | ||
oname := $(out-dir)/$(base-prefix)$(basename $$(sub-dir)/$1).o | ||
$$(eval $$(call process-file-vars,$1,$$(oname),$$(fname))) | ||
endef #process-subdir-srcs-y | ||
|
||
define process-subdir-gensrcs-helper | ||
|
@@ -90,36 +111,7 @@ $2: $$(depends-$1) | |
$(q)mkdir -p $4 | ||
$(q)$$(recipe-$2) | ||
|
||
cflags-$$(oname) := $$(cflags-y) $$(cflags-$(1)-y) | ||
cflags-remove-$$(oname) := $$(cflags-remove-y) \ | ||
$$(cflags-remove-$(1)-y) | ||
cxxflags-$$(oname) := $$(cxxflags-y) $$(cxxflags-$(1)-y) | ||
cxxflags-remove-$$(oname) := $$(cxxflags-remove-y) \ | ||
$$(cxxflags-remove-$(1)-y) | ||
cppflags-$$(oname) := $$(cppflags-y) $$(cppflags-$(1)-y) | ||
cppflags-remove-$$(oname) := $$(cppflags-remove-y) \ | ||
$$(cppflags-remove-$(1)-y) | ||
aflags-$$(oname) := $$(aflags-y) $$(aflags-$(1)-y) | ||
aflags-remove-$$(oname) := $$(aflags-remove-y) \ | ||
$$(aflags-remove-$(1)-y) | ||
incdirs-$$(oname) := $$(thissubdir-incdirs) $$(addprefix $(sub-dir)/,$$(incdirs-$(1)-y)) | ||
# Clear local filename specific variables to avoid accidental reuse | ||
# in another subdirectory | ||
cflags-$(1)-y := | ||
cflags-remove-$(1)-y := | ||
cflags-lib-y := | ||
cxxflags-$(1)-y := | ||
cxxflags-remove-$(1)-y := | ||
cxxflags-lib-y := | ||
cppflags-$(1)-y := | ||
cppflags-remove-$(1)-y := | ||
cppflags-lib-y := | ||
aflags-$(1)-y := | ||
aflags-remove-$(1)-y := | ||
incdirs-$(1)-y := | ||
fname := | ||
oname := | ||
|
||
jforissier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$$(eval $$(call process-file-vars,$1,$$(oname))) | ||
endef #process-subdir-gensrcs-helper | ||
|
||
define process-subdir-gensrcs-y | ||
|
@@ -140,7 +132,7 @@ endif | |
|
||
include $1/sub.mk | ||
sub-subdirs := $$(addprefix $1/,$$(subdirs-y)) $$(subdirs_ext-y) | ||
incdirs$(sm) := $(incdirs$(sm)) $$(addprefix $1/,$$(global-incdirs-y)) | ||
incdirs$(sm) := $(incdirs$(sm)) $$(addprefix $1/,$$(global-incdirs-y)) $$(global-incdirs_ext-y) | ||
thissubdir-incdirs := $(out-dir)/$(base-prefix)$1 $$(addprefix $1/,$$(incdirs-y)) $$(incdirs_ext-y) | ||
ifneq ($$(libname),) | ||
incdirs-lib$$(libname)-$$(sm) := $$(incdirs-lib$$(libname)-$$(sm)) $$(addprefix $1/,$$(incdirs-lib-y)) | ||
|
@@ -152,9 +144,13 @@ endif | |
# Process files in current directory | ||
$$(foreach g, $$(gensrcs-y), $$(eval $$(call process-subdir-gensrcs-y,$$(g)))) | ||
$$(foreach s, $$(srcs-y), $$(eval $$(call process-subdir-srcs-y,$$(s)))) | ||
$$(foreach s, $$(srcs_ext-y), $$(eval $$(call \ | ||
process-subdir-srcs_ext-y,$$(s),$$(firstword $$(srcs_ext_base-y))))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the best action if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder. It would be a programming error, indeed, and expended sources would not be build likely leading to some linkage error. |
||
$$(foreach a, $$(asm-defines-y), $$(eval $$(call process-subdir-asm-defines-y,$$(a)))) | ||
# Clear flags used when processing current directory | ||
srcs-y := | ||
srcs_ext-y := | ||
srcs_ext_base-y := | ||
cflags-y := | ||
cflags-lib-y := | ||
cxxflags-y := | ||
|
@@ -168,6 +164,7 @@ aflags-remove-y := | |
subdirs-y := | ||
subdirs_ext-y := | ||
global-incdirs-y := | ||
global-incdirs_ext-y := | ||
incdirs-lib-y := | ||
incdirs-y := | ||
incdirs_ext-y := | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
BINARY=bc50d971-d4c9-42c4-82cb-343fb7f37896 | ||
|
||
-include $(TA_DEV_KIT_DIR)/mk/ta_dev_kit.mk | ||
|
||
ifeq ($(wildcard $(TA_DEV_KIT_DIR)/mk/ta_dev_kit.mk), ) | ||
clean: | ||
@echo 'Note: $$(TA_DEV_KIT_DIR)/mk/ta_dev_kit.mk not found, cannot clean TA' | ||
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is
oname-<file-name>-y
defined?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's supposed to be set in the
sub.mk
file if used.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not easy to guess. If there was an example in the inline description above, it could maybe help.(edited)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discard my last comment. I missed to look at the commit message that defines how
oname-<filename>-y
should be used.