From 9c57bd830098b0eddfb8f48f6cceba57d41b8f1c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 12 Mar 2015 03:52:40 -0400 Subject: add a install_dev target This will install the libs/headers/devkeys that people normally want. BUG=chromium:466499 TEST=precq still passes BRANCH=None Change-Id: Ice035d7caddad4f05abd702d1a292b690a04d6d4 Reviewed-on: https://chromium-review.googlesource.com/259532 Trybot-Ready: Mike Frysinger Reviewed-by: Randall Spangler Commit-Queue: Mike Frysinger Tested-by: Mike Frysinger --- Makefile | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 28d302e0..5f21f32d 100644 --- a/Makefile +++ b/Makefile @@ -52,20 +52,28 @@ DEV_DEBUG_FORCE= # Where exactly do the pieces go? # UB_DIR = utility binary directory # ULP_DIR = pkgconfig directory, usually /usr/lib/pkgconfig +# UI_DIR = include directory for library headers +# US_DIR = shared data directory (for static content like devkeys) # DF_DIR = utility defaults directory # VB_DIR = vboot binary directory for dev-mode-only scripts ifeq (${MINIMAL},) # Host install just puts everything where it's told UB_DIR=${DESTDIR}/bin -ULP_DIR=${DESTDIR}/${LIBDIR}/pkgconfig +UL_DIR=${DESTDIR}/${LIBDIR} +ULP_DIR=${UL_DIR}/pkgconfig +UI_DIR=${DESTDIR}/include/vboot +US_DIR=${DESTDIR}/share/vboot DF_DIR=${DESTDIR}/default VB_DIR=${DESTDIR}/bin else # Target install puts things into different places UB_DIR=${DESTDIR}/usr/bin -ULP_DIR=${DESTDIR}/usr/${LIBDIR}/pkgconfig +UL_DIR=${DESTDIR}/usr/${LIBDIR} +ULP_DIR=${UL_DIR}/pkgconfig +UI_DIR=${DESTDIR}/usr/include/vboot +US_DIR=${DESTDIR}/usr/share/vboot DF_DIR=${DESTDIR}/etc/default -VB_DIR=${DESTDIR}/usr/share/vboot/bin +VB_DIR=${US_DIR}/bin endif # Where to install the (exportable) executables for testing? @@ -785,6 +793,9 @@ clean: install: cgpt_install utils_install signing_install futil_install \ pc_files_install +.PHONY: install_dev +install_dev: headers_install lib_install + .PHONY: install_mtd install_mtd: install cgpt_wrapper_install @@ -960,6 +971,28 @@ ${TINYHOSTLIB}: ${TINYHOSTLIB_OBJS} @${PRINTF} " AR $(subst ${BUILD}/,,$@)\n" ${Q}ar qc $@ $^ +.PHONY: headers_install +headers_install: + @${PRINTF} " INSTALL HEADERS\n" + ${Q}mkdir -p ${UI_DIR} + ${Q}${INSTALL} -t ${UI_DIR} -m644 \ + host/include/* \ + firmware/include/gpt.h \ + firmware/include/tlcl.h \ + firmware/include/tss_constants.h + +.PHONY: lib_install +lib_install: ${HOSTLIB} + @${PRINTF} " INSTALL HOSTLIB\n" + ${Q}mkdir -p ${UL_DIR} + ${Q}${INSTALL} -t ${UL_DIR} -m644 $^ + +.PHONY: devkeys_install +devkeys_install: + @${PRINTF} " INSTALL DEVKEYS\n" + ${Q}mkdir -p ${US_DIR}/devkeys + ${Q}${INSTALL} -t ${US_DIR}/devkeys -m644 tests/devkeys/* + # ---------------------------------------------------------------------------- # CGPT library and utility -- cgit v1.2.1