Re: [Qemu-devel] [PATCH v6 2/8] rule.mak: allow per object cflags and libs

2013-09-12 Thread Fam Zheng
On Thu, 09/12 08:34, Paolo Bonzini wrote: > Il 12/09/2013 04:52, Fam Zheng ha scritto: > >>> > > define unnest-dir > >>> > > $(foreach var,$(nested-vars),$(call push-var,$(var),$1/)) > >>> > > $(eval obj-parent-$1 := $(obj)) > >>> > > $(eval obj := $(if $(obj),$(obj)/$1,$1)) > >>> > > $(eval i

Re: [Qemu-devel] [PATCH v6 2/8] rule.mak: allow per object cflags and libs

2013-09-11 Thread Paolo Bonzini
Il 12/09/2013 04:52, Fam Zheng ha scritto: >>> > > define unnest-dir >>> > > $(foreach var,$(nested-vars),$(call push-var,$(var),$1/)) >>> > > $(eval obj-parent-$1 := $(obj)) >>> > > $(eval obj := $(if $(obj),$(obj)/$1,$1)) >>> > > $(eval include $(SRC_PATH)/$1/Makefile.objs) >>> > > +$(foreac

Re: [Qemu-devel] [PATCH v6 2/8] rule.mak: allow per object cflags and libs

2013-09-11 Thread Fam Zheng
On Wed, 09/11 15:43, Paolo Bonzini wrote: > Il 11/09/2013 15:34, Fam Zheng ha scritto: > > Adds extract-libs in LINK to expand any "per object libs", the syntax to > > define > > such a libs options is like: > > > > foo.o-libs := $(CURL_LIBS) > > > > in block/Makefile.objs. > > > > Simi

Re: [Qemu-devel] [PATCH v6 2/8] rule.mak: allow per object cflags and libs

2013-09-11 Thread Paolo Bonzini
Il 11/09/2013 15:34, Fam Zheng ha scritto: > Adds extract-libs in LINK to expand any "per object libs", the syntax to > define > such a libs options is like: > > foo.o-libs := $(CURL_LIBS) > > in block/Makefile.objs. > > Similarly, > > foo.o-cflags := $(FOO_CFLAGS) > > is also

[Qemu-devel] [PATCH v6 2/8] rule.mak: allow per object cflags and libs

2013-09-11 Thread Fam Zheng
Adds extract-libs in LINK to expand any "per object libs", the syntax to define such a libs options is like: foo.o-libs := $(CURL_LIBS) in block/Makefile.objs. Similarly, foo.o-cflags := $(FOO_CFLAGS) is also supported. "foo.o" must be listed a nested var (e.g. common-obj-y) t