summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStéphane Marchesin <marcheu@chromium.org>2014-09-18 14:42:42 -0700
committerStéphane Marchesin <marcheu@chromium.org>2014-09-19 02:31:53 +0000
commiteeac2ff6d3addc5a3a47062956ef9a067eca686e (patch)
tree02bd8d8afcbd44db55b93437d3197d282810779d /Makefile
parent8c7039c8a94842d2b9ad3eadfd480692b7940bcf (diff)
downloadminigbm-eeac2ff6d3addc5a3a47062956ef9a067eca686e.tar.gz
Include libdrm_* headers propertly
We don't want to use the misc. platform-specific libdrms, but we still need the headers for the ioctl definitions and such. So let's react to the GBM_* flags and use pkg-config to find the path to those headers. BUG=chromium:412508 TEST=emerge-daisy_freon minigbm Change-Id: Ie8e1812fc0cebbc025d9c57a9032541c6a7e6da0 Reviewed-on: https://chromium-review.googlesource.com/219010 Reviewed-by: Stéphane Marchesin <marcheu@chromium.org> Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 583b196..3bab0a8 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,16 @@ PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS))
CPPFLAGS += -std=c99 -D_GNU_SOURCE=1
CFLAGS += -Wall -Wsign-compare -Wpointer-arith -Wcast-qual -Wcast-align
+ifdef $(GBM_EXYNOS)
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_exynos)
+endif
+ifdef $(GBM_I915)
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_intel)
+endif
+ifdef $(GBM_ROCKCHIP)
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_rockchip)
+endif
+
CPPFLAGS += $(PC_CFLAGS)
LDLIBS += $(PC_LIBS)