rules.mak: allow per object cflags and libs
authorFam Zheng <famz@redhat.com>
Mon, 10 Feb 2014 06:48:53 +0000 (14:48 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 20 Feb 2014 12:12:54 +0000 (13:12 +0100)
commit5c0d52bcd3aada33e274ea7dad75955f98bc2636
tree26c967d29f6e9830fb972c3811fede422843a21c
parentba1183da9a10b94611cad88c44a5c6df005f9b55
rules.mak: allow per object cflags and libs

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 in a nested var (e.g. common-obj-y) to make the
option variables effective.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rules.mak