diff options
author | Jerome Forissier <jerome@forissier.org> | 2020-08-14 09:53:03 +0200 |
---|---|---|
committer | Jérôme Forissier <jerome@forissier.org> | 2020-08-14 14:59:51 +0200 |
commit | 4010618f8dbfd8c894bfb7fc4be696de80499c9b (patch) | |
tree | 43b4953b87fbb72ff25b6659f83b04a0b67b7bf3 /mk | |
parent | a0477f6f0e20df39f5d43f87e299bd5c3d786a08 (diff) |
mk/subdir.mk: handle C++ flags related variables
Adds proper handling of cxxflags-y, cxxflags-<file name>-y,
cxxflags-remove-y, cxxflags-remove-<file name>-y, cxxflags-lib-y in the
same way as for C flags.
Fixes: be3bc461c686 ("ta: experimental C++ support")
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/subdir.mk | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mk/subdir.mk b/mk/subdir.mk index eeb9a736..39a3f455 100644 --- a/mk/subdir.mk +++ b/mk/subdir.mk @@ -6,12 +6,14 @@ # # set srcs gen-srcs # set cflags-$(oname) cflags-remove-$(oname) +# cxxflags-$(oname) cxxflags-remove-$(oname) # aflags-$(oname) aflags-remove-$(oname) # cppflags-$(oname) cppflags-remove-$(oname) # incdirs-$(oname) # incdirs-lib$(libname)-$(sm) [if libname is defined] # cppflags-lib$(libname)-$(sm) [if libname is defined] # cflags-lib$(libname)-$(sm) [if libname is defined] +# cxxflags-lib$(libname)-$(sm) [if libname is defined] # for each file found, oname is the name of the object file for corresponding # source file @@ -36,6 +38,9 @@ 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) @@ -48,6 +53,9 @@ incdirs-$$(oname) := $$(thissubdir-incdirs) $$(addprefix $(sub-dir)/,$$(incdirs 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 := @@ -83,6 +91,9 @@ $2: $$(depends-$1) 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) @@ -95,6 +106,9 @@ incdirs-$$(oname) := $$(thissubdir-incdirs) $$(addprefix $(sub-dir)/,$$(incdirs 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 := @@ -129,6 +143,7 @@ thissubdir-incdirs := $(out-dir)/$(base-prefix)$1 $$(addprefix $1/,$$(incdirs-y) ifneq ($$(libname),) incdirs-lib$$(libname)-$$(sm) := $$(incdirs-lib$$(libname)-$$(sm)) $$(addprefix $1/,$$(incdirs-lib-y)) cflags-lib$$(libname)-$$(sm) := $$(cflags-lib$$(libname)-$$(sm)) $$(cflags-lib-y) +cxxflags-lib$$(libname)-$$(sm) := $$(cxxflags-lib$$(libname)-$$(sm)) $$(cxxflags-lib-y) cppflags-lib$$(libname)-$$(sm) := $$(cppflags-lib$$(libname)-$$(sm)) $$(cppflags-lib-y) endif @@ -140,10 +155,13 @@ $$(foreach a, $$(asm-defines-y), $$(eval $$(call process-subdir-asm-defines-y,$$ srcs-y := cflags-y := cflags-lib-y := +cxxflags-y := +cxxflags-lib-y := cppflags-y := cppflags-lib-y := aflags-y := cflags-remove-y := +cxxflags-remove-y := aflags-remove-y := subdirs-y := global-incdirs-y := |