vboot_reference: Install vboot_host.pc file
Since we are going to pull in libmtdutils, it would be nice to let downstream packages automatically query for appropriate linking flags. BUG=chromium:459338 BRANCH=None CQ-DEPEND=CL:250836 TEST=See the depending CL. Change-Id: I9ff8046b95e1d7e909a483fe87a69d460777e192 Reviewed-on: https://chromium-review.googlesource.com/250530 Commit-Queue: Nam Nguyen <namnguyen@chromium.org> Trybot-Ready: Nam Nguyen <namnguyen@chromium.org> Tested-by: Nam Nguyen <namnguyen@chromium.org> Reviewed-by: Nam Nguyen <namnguyen@chromium.org>
This commit is contained in:
parent
aa4ee34524
commit
07d9043da4
23
Makefile
23
Makefile
|
@ -44,22 +44,26 @@ export BUILD
|
|||
# Stuff for 'make install'
|
||||
INSTALL = install
|
||||
DESTDIR = /usr/local
|
||||
LIBDIR ?= lib
|
||||
|
||||
# Default values
|
||||
DEV_DEBUG_FORCE=
|
||||
|
||||
# Where exactly do the pieces go?
|
||||
# UB_DIR = utility binary directory
|
||||
# ULP_DIR = pkgconfig directory, usually /usr/lib/pkgconfig
|
||||
# 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
|
||||
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
|
||||
DF_DIR=${DESTDIR}/etc/default
|
||||
VB_DIR=${DESTDIR}/usr/share/vboot/bin
|
||||
endif
|
||||
|
@ -160,6 +164,10 @@ ifneq (${PD_SYNC},)
|
|||
CFLAGS += -DPD_SYNC
|
||||
endif
|
||||
|
||||
# NOTE: We don't use these files but they are useful for other packages to
|
||||
# query about required compiling/linking flags.
|
||||
PC_IN_FILES = vboot_host.pc.in
|
||||
|
||||
# Create / use dependency files
|
||||
CFLAGS += -MMD -MF $@.d
|
||||
|
||||
|
@ -754,7 +762,8 @@ clean:
|
|||
${Q}/bin/rm -rf ${BUILD}
|
||||
|
||||
.PHONY: install
|
||||
install: cgpt_install utils_install signing_install futil_install
|
||||
install: cgpt_install utils_install signing_install futil_install \
|
||||
pc_files_install
|
||||
|
||||
.PHONY: install_mtd
|
||||
install_mtd: install cgpt_wrapper_install
|
||||
|
@ -1403,3 +1412,15 @@ tags TAGS xrefs: ${BUILD}/cscope.files
|
|||
${Q}\rm -f ${BUILD}/tags ${BUILD}/TAGS
|
||||
${Q}$(call run_if_prog,etags,${cmd_etags})
|
||||
${Q}$(call run_if_prog,ctags,${cmd_ctags})
|
||||
|
||||
PC_FILES = ${PC_IN_FILES:%.pc.in=%.pc}
|
||||
${PC_FILES}: ${PC_IN_FILES}
|
||||
${Q}sed \
|
||||
-e 's:@LDLIBS@:${LDLIBS}:' \
|
||||
-e 's:@LIBDIR@:${LIBDIR}:' \
|
||||
$< > $@
|
||||
|
||||
.PHONY: pc_files_install
|
||||
pc_files_install: ${PC_FILES}
|
||||
${Q}mkdir -p ${ULP_DIR}
|
||||
${Q}${INSTALL} -D -m 0644 $< ${ULP_DIR}/$<
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
prefix=/usr
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/include
|
||||
libdir=${prefix}/@LIBDIR@
|
||||
|
||||
Name: libvboot_host
|
||||
Version: 2
|
||||
Description: Static library of functions related to vboot and cgpt.
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lvboot_host @LDLIBS@
|
Loading…
Reference in New Issue