[Pdbg] [PATCH v2] libpdbg: Add pkgconfig
Amitay Isaacs
amitay at ozlabs.org
Fri Oct 16 11:13:36 AEDT 2020
On Wed, 2020-10-14 at 14:19 -0400, Brad Bishop wrote:
> Add a pdbg.pc for build systems that make use of pkgconfig.
>
> Signed-off-by: Brad Bishop <bradleyb at fuzziesquirrel.com>
> ---
> Makefile.am | 3 +++
> configure.ac | 1 +
> libpdbg/pdbg.pc.in | 11 +++++++++++
> 3 files changed, 15 insertions(+)
> create mode 100644 libpdbg/pdbg.pc.in
>
> diff --git a/Makefile.am b/Makefile.am
> index dce09ab..385529c 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -122,6 +122,9 @@ pdbg_LDADD = libpdbg.la libccan.a \
> pdbg_LDFLAGS = -Wl,--whole-archive,-lpdbg,--no-whole-archive
>
> lib_LTLIBRARIES = libpdbg.la
> +pkgconfiglibdir = ${libdir}/pkgconfig
> +pkgconfiglib_DATA = libpdbg/pdbg.pc
> +
> noinst_LTLIBRARIES = libcronus.la libsbefifo.la
>
> libcronus_la_SOURCES = \
> diff --git a/configure.ac b/configure.ac
> index 0f8b9de..04b14aa 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -35,6 +35,7 @@ fi
> AC_CONFIG_MACRO_DIR([m4])
> AC_CONFIG_HEADERS([config.h])
> AC_CONFIG_FILES([Makefile])
> +AC_CONFIG_FILES([libpdbg/pdbg.pc])
> AC_LANG(C)
>
> case "$host" in
> diff --git a/libpdbg/pdbg.pc.in b/libpdbg/pdbg.pc.in
> new file mode 100644
> index 0000000..5d089e5
> --- /dev/null
> +++ b/libpdbg/pdbg.pc.in
> @@ -0,0 +1,11 @@
> +prefix=@prefix@
> +exec_prefix=@exec_prefix@
> +libdir=@libdir@
> +includedir=@includedir@
> +
> +Name: pdbg
> +Description: POWER processor debugger
> +URL: https://github.com/open-power/pdbg
> +Version: @VERSION@
> +Libs: -L${libdir} -lpdbg
> +Cflags: -I${includedir}
> --
> 2.26.2
I preempted your second version and pushed it with the same changes.
Also, it requires another change to know if building with system libfdt
or built-in libfdt.
The patches are upstream.
Amitay.
--
If you're looking for a big opportunity, seek out a big problem.
More information about the Pdbg
mailing list