tools: tweak tools/libs/libs.mk for being able to support libxenctrl
authorJuergen Gross <jgross@suse.com>
Sun, 23 Aug 2020 08:00:12 +0000 (10:00 +0200)
committerWei Liu <wl@xen.org>
Fri, 28 Aug 2020 09:02:13 +0000 (09:02 +0000)
commitd400dc5729e4e132d61c2e7df57d81aaed762044
tree9bad5a8ec1c645ada0cfe169e5865d6bf99bf609
parent8d990807ec2cde3061222a5ed2df62aba78bace9
tools: tweak tools/libs/libs.mk for being able to support libxenctrl

tools/libs/libs.mk needs to be modified for being able to support
building libxenctrl, as the pkg-config file of that library is not
following the same conventions as those of the other libraries.

So add support for specifying PKG_CONFIG before including libs.mk.

In order to make life easier for unstable libraries like libxenctrl
set MAJOR and MINOR automatically to the Xen-version and 0 when not
specified. This removes the need to bump the versions of unstable
libraries when switching to a new Xen version.

As all libraries built via libs.mk require a map file generate a dummy
one in case there is none existing. This again will help avoiding the
need to bump the libarary version in the map file of an unstable
library in case it is exporting all symbols.

The clean target is missing the removal of _paths.h.

Finally drop the foreach loop when setting PKG_CONFIG_LOCAL, as there
is always only one element in PKG_CONFIG.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libs/libs.mk