[Pdbg] [PATCH] Makefile: Add libfdt include path conditionally
Alistair Popple
alistair at popple.id.au
Tue Jul 2 12:08:41 AEST 2019
Thanks Amitay.
Reviewed-by: Alistair Popple <alistair at popple.id.au>
On Wednesday, 19 June 2019 1:11:52 PM AEST Amitay Isaacs wrote:
> When building with system libfdt, use the system header files.
>
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
> Makefile.am | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 10c56b2..22faf6e 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -135,8 +135,6 @@ pdbg_LDADD = $(DT_objects) libpdbg.la libccan.a \
>
> lib_LTLIBRARIES = libpdbg.la
>
> -libpdbg_la_CFLAGS = -I$(top_srcdir)/libfdt -Wall -Werror
> -
> libpdbg_la_SOURCES = \
> libpdbg/adu.c \
> libpdbg/backend.h \
> @@ -166,7 +164,10 @@ libpdbg_la_SOURCES = \
> libpdbg/target.h \
> libpdbg/xbus.c
>
> +libpdbg_la_CFLAGS = -Wall -Werror
> +
> if BUILD_LIBFDT
> +libpdbg_la_CFLAGS += -I$(top_srcdir)/libfdt
> libpdbg_la_LIBADD = libfdt/libfdt.la
> endif
>
> @@ -186,9 +187,13 @@ libccan_a_SOURCES = \
> ccan/str/str.c \
> ccan/str/str.h
>
> -libpdbg_test_cflags = -I$(top_srcdir)/libpdbg -I$(top_srcdir)/libfdt
> +libpdbg_test_cflags = -I$(top_srcdir)/libpdbg
> libpdbg_test_ldadd = -L.libs libpdbg.la
>
> +if BUILD_LIBFDT
> +libpdbg_test_cflags += -I$(top_srcdir)/libfdt
> +endif
> +
> libpdbg_target_test_SOURCES = src/tests/libpdbg_target_test.c
> libpdbg_target_test_CFLAGS = $(libpdbg_test_cflags)
> libpdbg_target_test_LDADD = fake.dtb.o $(libpdbg_test_ldadd)
More information about the Pdbg
mailing list