From 51de1f529fe40254cabab671b99be2e9d9630bd5 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Tue, 9 May 2017 23:07:01 +0900 Subject: [PATCH] minigbm: cros_gralloc: Use pkg-config for LIBS This changes the Makefile to use pkg-config to query for necessary library paths and names instead of hardcoding -ldrm. BUG=b:36540057 TEST=emerge-reef arc-cros-gralloc with multilib patches CQ-DEPEND=CL:505794 Change-Id: Id223203506d71b3966e9730f92badb461eb6cb1b Reviewed-on: https://chromium-review.googlesource.com/499971 Commit-Ready: Tomasz Figa Tested-by: Tomasz Figa Reviewed-by: Luis Hector Chavez Reviewed-by: Nicolas Boichat --- cros_gralloc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cros_gralloc/Makefile b/cros_gralloc/Makefile index 98b14ee..9e1be9e 100644 --- a/cros_gralloc/Makefile +++ b/cros_gralloc/Makefile @@ -11,12 +11,12 @@ PKG_CONFIG ?= pkg-config VPATH = $(dir $(SOURCES)) LIBDRM_CFLAGS := $(shell $(PKG_CONFIG) --cflags libdrm) +LIBDRM_LIBS := $(shell $(PKG_CONFIG) --libs libdrm) CPPFLAGS += -Wall -fPIC -Werror -flto $(LIBDRM_CFLAGS) CXXFLAGS += -std=c++11 CFLAGS += -std=c99 -# TODO(gurchetansingh): Switch to pkg-config. -LIBS += -shared -lcutils -lhardware -ldrm +LIBS += -shared -lcutils -lhardware $(LIBDRM_LIBS) OBJS = $(foreach source, $(SOURCES), $(addsuffix .o, $(basename $(source))))