[Pdbg] [PATCH 2/3] configure: Use subdir build for libfdt
Amitay Isaacs
amitay at ozlabs.org
Fri May 10 14:11:26 AEST 2019
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
Makefile.am | 23 +++++------------------
configure.ac | 1 +
2 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index f1e06f6..8f9dff7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,9 @@
AUTOMAKE_OPTIONS = foreign
AM_MAKEFLAGS = --no-print-directory
+SUBDIRS = libfdt
+DIST_SUBDIRS = libfdt
+
GIT_SHA1 ?= `git --work-tree=$(top_srcdir) --git-dir=$(top_srcdir)/.git describe --always --long --dirty 2>/dev/null || echo unknown`
libpdbg_tests = libpdbg_target_test \
@@ -124,26 +127,10 @@ pdbg_LDADD = $(DT_objects) libpdbg.la libccan.a \
pdbg_LDFLAGS = -Wl,--whole-archive,-lpdbg,--no-whole-archive
-lib_LTLIBRARIES = libfdt.la libpdbg.la
+lib_LTLIBRARIES = libpdbg.la
-libfdt_la_CFLAGS = -I$(top_srcdir)/libfdt
libpdbg_la_CFLAGS = -I$(top_srcdir)/libfdt -Wall -Werror
-libfdt_la_SOURCES = \
- libfdt/fdt_addresses.c \
- libfdt/fdt.c \
- libfdt/fdt_empty_tree.c \
- libfdt/fdt.h \
- libfdt/fdt_overlay.c \
- libfdt/fdt_ro.c \
- libfdt/fdt_rw.c \
- libfdt/fdt_strerror.c \
- libfdt/fdt_sw.c \
- libfdt/fdt_wip.c \
- libfdt/libfdt_env.h \
- libfdt/libfdt.h \
- libfdt/libfdt_internal.h
-
libpdbg_la_SOURCES = \
libpdbg/adu.c \
libpdbg/backend.h \
@@ -170,7 +157,7 @@ libpdbg_la_SOURCES = \
libpdbg/target.h \
libpdbg/xbus.c
-libpdbg_la_LIBADD = libfdt.la
+libpdbg_la_LIBADD = libfdt/libfdt.la
include_HEADERS = libpdbg/libpdbg.h
diff --git a/configure.ac b/configure.ac
index a52e1ed..9c22e2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,7 @@ AC_PATH_PROG([RAGEL], [ragel])
AC_SUBST([RAGEL])
AM_CONDITIONAL([HAVE_RAGEL], [test x"$ac_cv_path_RAGEL" != "x"])
+AC_CONFIG_SUBDIRS([libfdt])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
--
2.20.1
More information about the Pdbg
mailing list