[PATCH dtc] Makefile: provide separate install targets

Jeremy Kerr jk at ozlabs.org
Thu Jul 4 11:58:23 EST 2013


Currently `make install` will install the binaries, libraries and
includes.

This change separates the install target into install-bin, install-lib
and install-includes, so we have more flexibility, particularly when
we're just using libfdt.

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>

---
 Makefile |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 1169e6c..e64bf6b 100644
--- a/Makefile
+++ b/Makefile
@@ -160,18 +160,26 @@ endif
 # intermediate target and building them again "for real"
 .SECONDARY: $(DTC_GEN_SRCS) $(CONVERT_GEN_SRCS)
 
-install: all $(SCRIPTS)
-	@$(VECHO) INSTALL
+install-bin: all $(SCRIPTS)
+	@$(VECHO) INSTALL-BIN
 	$(INSTALL) -d $(DESTDIR)$(BINDIR)
 	$(INSTALL) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
+
+install-lib: all
+	@$(VECHO) INSTALL-LIB
 	$(INSTALL) -d $(DESTDIR)$(LIBDIR)
 	$(INSTALL) $(LIBFDT_lib) $(DESTDIR)$(LIBDIR)
 	ln -sf $(notdir $(LIBFDT_lib)) $(DESTDIR)$(LIBDIR)/$(LIBFDT_soname)
 	ln -sf $(LIBFDT_soname) $(DESTDIR)$(LIBDIR)/libfdt.$(SHAREDLIB_EXT)
 	$(INSTALL) -m 644 $(LIBFDT_archive) $(DESTDIR)$(LIBDIR)
+
+install-includes:
+	@$(VECHO) INSTALL-INC
 	$(INSTALL) -d $(DESTDIR)$(INCLUDEDIR)
 	$(INSTALL) -m 644 $(LIBFDT_include) $(DESTDIR)$(INCLUDEDIR)
 
+install: install-bin install-lib install-includes
+
 $(VERSION_FILE): Makefile FORCE
 	$(call filechk,version)
 


More information about the devicetree-discuss mailing list