libfdt_clean is now defined in the libfdt Makefile and as a result, we don't need to redefine it in the top Makefile. In addition we define some variables for the remaining libfdt_clean rule. Signed-off-by: Nikos Nikoleris <nikos.nikoleris@xxxxxxx> --- Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e0828fe..37aa3c6 100644 --- a/Makefile +++ b/Makefile @@ -40,8 +40,6 @@ cflatobjs := \ LIBFDT_objdir = lib/libfdt LIBFDT_srcdir = $(SRCDIR)/lib/libfdt LIBFDT_archive = $(LIBFDT_objdir)/libfdt.a -LIBFDT_include = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_INCLUDES)) -LIBFDT_version = $(addprefix $(LIBFDT_srcdir)/,$(LIBFDT_VERSION)) OBJDIRS += $(LIBFDT_objdir) @@ -90,6 +88,10 @@ $(LIBFDT_archive): CFLAGS += -ffreestanding -I $(SRCDIR)/lib -I $(SRCDIR)/lib/li $(LIBFDT_archive): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS)) $(AR) rcs $@ $^ +libfdt_clean: VECHO = echo " " +libfdt_clean: STD_CLEANFILES = *.o *.d +libfdt_clean: LIBFDT_dir = $(LIBFDT_objdir) +libfdt_clean: SHAREDLIB_EXT = so # Build directory target .PHONY: directories @@ -113,12 +115,8 @@ install: standalone clean: arch_clean $(RM) lib/.*.d $(libcflat) $(cflatobjs) -libfdt_clean: - $(RM) $(LIBFDT_archive) \ - $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS)) \ - $(LIBFDT_objdir)/.*.d - distclean: clean libfdt_clean + $(RM) $(LIBFDT_archive) $(RM) lib/asm lib/config.h config.mak $(TEST_DIR)-run msr.out cscope.* build-head $(RM) -r tests logs logs.old -- 2.25.1