From: Luis Hector Chavez Date: Wed, 3 May 2017 22:14:41 +0000 (-0700) Subject: minigbm: cros_gralloc: Use pkg-config X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5272e812b594d10232826c4bded9c6ad7d77469a;p=android-x86%2Fexternal-minigbm.git minigbm: cros_gralloc: Use pkg-config This change uses pkg-config to find the libdrm headers instead of relying on the arc-toolchain sysroot. BUG=b:26864637 TEST=reef compiles, surfaceflinger is happy CQ-DEPEND=CL:494886 Change-Id: Ic6142424ff5593ab5552dd61b8ae4b7dc38497fc Reviewed-on: https://chromium-review.googlesource.com/495267 Commit-Ready: Luis Hector Chavez Tested-by: Luis Hector Chavez Reviewed-by: Gurchetan Singh --- diff --git a/cros_gralloc/Makefile b/cros_gralloc/Makefile index 2798355..98b14ee 100644 --- a/cros_gralloc/Makefile +++ b/cros_gralloc/Makefile @@ -7,12 +7,15 @@ GRALLOC = gralloc.cros.so SRCS = $(wildcard *.cc) SRCS += $(wildcard ../*.c) SOURCES = $(filter-out ../gbm%, $(SRCS)) +PKG_CONFIG ?= pkg-config VPATH = $(dir $(SOURCES)) +LIBDRM_CFLAGS := $(shell $(PKG_CONFIG) --cflags libdrm) -CPPFLAGS += -Wall -fPIC -Werror -flto +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 OBJS = $(foreach source, $(SOURCES), $(addsuffix .o, $(basename $(source))))