The compiling is done in a subdir, so the extraction of per-object libs
and cflags are referencing objects with ../ prefixed. So prefix the
per-object variables "foo.o-cflags" and "foo.o-libs" to
"../foo.o-cflags" and "../foo.o-libs".

Signed-off-by: Fam Zheng <f...@redhat.com>
---
 Makefile.target | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index ba12340..3a30aad 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -146,11 +146,12 @@ obj-y-save := $(obj-y)
 block-obj-y :=
 common-obj-y :=
 include $(SRC_PATH)/Makefile.objs
-dummy := $(call unnest-vars,.., \
-               block-obj-y \
-               block-obj-m \
-               common-obj-y \
-               common-obj-m)
+vars := block-obj-y \
+        block-obj-m \
+        common-obj-y \
+        common-obj-m
+dummy := $(foreach v,$(vars),$(call fix-obj-vars,$v,../))
+dummy := $(call unnest-vars,.., $(vars))
 
 # Now restore obj-y
 obj-y := $(obj-y-save)
-- 
1.9.2


Reply via email to