Browse Source

dtc: Clean up included Makefile fragments

Currently the Makefile.dtc and Makefile.libfdt fragments include a
number of things that seemed like they might be useful for other
projects embedding the pieces, or for a make dist target.

Well, we have no make dist target, it's become fairly unclear that
these things would actually be useful to embedders (the kernel
certainly doesn't use them), and it's a bunch of stuff with no current
users.

This patch, therefore, removes a bunch of unused definitions from the
Makefile fragments.  It also removes a dependency declared in
Makefile.libfdt (of libfdt.a on the constituent .o files) which was
incorrect (wrong path), and if corrected would be redundant with the
similar dependency in the top-level makefile.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
David Gibson 17 years ago committed by Jon Loeliger
parent
commit
6a6c972cdf
  1. 7
      Makefile
  2. 18
      Makefile.dtc
  3. 7
      libfdt/Makefile.libfdt
  4. 4
      tests/Makefile.tests

7
Makefile

@ -53,7 +53,7 @@ install: all @@ -53,7 +53,7 @@ install: all
$(INSTALL) -d $(DESTDIR)$(BINDIR)
$(INSTALL) -m 755 dtc $(DESTDIR)$(BINDIR)
$(INSTALL) -d $(DESTDIR)$(LIBDIR)
$(INSTALL) -m 644 $(LIBFDT_LIB) $(DESTDIR)$(LIBDIR)
$(INSTALL) -m 644 $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
$(INSTALL) -m 644 $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_INCLUDES)) $(DESTDIR)$(INCLUDEDIR)

@ -135,12 +135,13 @@ endif @@ -135,12 +135,13 @@ endif
#
LIBFDT_objdir = libfdt
LIBFDT_srcdir = libfdt
LIBFDT_lib = $(LIBFDT_objdir)/libfdt.a
include $(LIBFDT_srcdir)/Makefile.libfdt

.PHONY: libfdt
libfdt: $(LIBFDT_LIB)
libfdt: $(LIBFDT_lib)

$(LIBFDT_LIB): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))
$(LIBFDT_lib): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))

libfdt_clean:
@$(VECHO) CLEAN "(libfdt)"

18
Makefile.dtc

@ -5,21 +5,5 @@ @@ -5,21 +5,5 @@
#
DTC_SRCS = dtc.c flattree.c fstree.c data.c livetree.c treesource.c srcpos.c \
checks.c
DTC_EXTRA = dtc.h srcpos.h
DTC_LEXFILES = dtc-lexer.l
DTC_BISONFILES = dtc-parser.y

DTC_LEX_SRCS = $(DTC_LEXFILES:%.l=%.lex.c)
DTC_BISON_SRCS = $(DTC_BISONFILES:%.y=%.tab.c)
DTC_BISON_INCLUDES = $(DTC_BISONFILES:%.y=%.tab.h)

DTC_GEN_SRCS = $(DTC_LEX_SRCS) $(DTC_BISON_SRCS)
DTC_GEN_ALL = $(DTC_GEN_SRCS) $(DTC_BISON_INCLUDES)
DTC_GEN_SRCS = dtc-lexer.lex.c dtc-parser.tab.c
DTC_OBJS = $(DTC_SRCS:%.c=%.o) $(DTC_GEN_SRCS:%.c=%.o)

DTC_CLEANFILES = $(DTC_GEN_ALL)

# We assume the containing Makefile system can do auto-dependencies for most
# things, but we supply the dependencies on generated header files explicitly

$(addprefix $(DTC_objdir)/,$(DTC_GEN_SRCS:%.c=%.o)): $(addprefix $(DTC_objdir)/,$(DTC_BISON_INCLUDES))

7
libfdt/Makefile.libfdt

@ -4,11 +4,4 @@ @@ -4,11 +4,4 @@
# be easily embeddable into other systems of Makefiles.
#
LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
LIBFDT_INCLUDES = fdt.h libfdt.h
LIBFDT_EXTRA = libfdt_internal.h
LIBFDT_LIB = libfdt/libfdt.a

LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)

$(LIBFDT_objdir)/$(LIBFDT_LIB): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))


4
tests/Makefile.tests

@ -35,9 +35,9 @@ BIN += $(TESTS) $(TESTS_PREFIX)dumptrees @@ -35,9 +35,9 @@ BIN += $(TESTS) $(TESTS_PREFIX)dumptrees
.PHONY: tests
tests: $(TESTS) $(TESTS_TREES)

$(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o $(LIBFDT_LIB)
$(LIB_TESTS): %: $(TESTS_PREFIX)testutils.o $(LIBFDT_lib)

$(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_LIB)
$(LIBTREE_TESTS): %: $(TESTS_PREFIX)testutils.o $(TESTS_PREFIX)trees.o $(LIBFDT_lib)

$(TESTS_PREFIX)dumptrees: $(TESTS_PREFIX)trees.o


Loading…
Cancel
Save