libs/stat: Fix and rework perl-binding build
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 25 Feb 2022 15:13:14 +0000 (15:13 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 16 Jun 2022 15:58:50 +0000 (16:58 +0100)
commit9ae030da5cf3bd7151d2d2d7125c768bfcffff97
treeed9c95b422cc05e726dd71eeee26a693f5dcc1d9
parent1e983961452bec4df691e1c6521e06de8567486a
libs/stat: Fix and rework perl-binding build

For PERL_FLAGS, use make's shell rather than a backquote.

Rather than relying on the VCS to create an empty directory for us,
we can create one before generating the *.c file for the bindings.

Make use of generic variable names to build a shared library from a
source file: CFLAGS, LDFLAGS, and LDLIBS.

To build a shared library, we need to build the source file with
"-fPIC", which was drop by 6d0ec05390 (tools: split libxenstat into
new tools/libs/stat directory).

The source file generated by swig seems to be missing many prototype for
many functions, so we need "-Wno-missing-prototypes" in order to
build it. Also, one of the prototype is deemed malformed, so we also
need "-Wno-strict-prototypes".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
tools/libs/stat/Makefile
tools/libs/stat/bindings/swig/perl/.empty [deleted file]