We would like to reuse the same set of drivers for ChromeOS (with a minigbm frontend) and Android (with a gralloc frontend). Since we don't want to pollute the gbm API with gralloc formats and usages, we can refactor minigbm on top a private API that will be a superset of gbm and gralloc. This change redirects gbm calls to the private API. TEST=Ran graphics_Gbm on minnie and cyan, and checked if Chrome boots. BUG=chromium:616275 CQ-DEPEND=CL:367791 Change-Id: I50d10f9d6c7ea936b0d76c5299a58d948939fdf9 Reviewed-on: https://chromium-review.googlesource.com/367780 Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org> Tested-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
46 lines
1.4 KiB
Makefile
46 lines
1.4 KiB
Makefile
# Copyright 2014 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
include common.mk
|
|
|
|
PC_DEPS = libdrm
|
|
PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PC_DEPS))
|
|
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 DRV_EXYNOS
|
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_exynos)
|
|
endif
|
|
ifdef DRV_I915
|
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_intel)
|
|
endif
|
|
ifdef DRV_ROCKCHIP
|
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_rockchip)
|
|
endif
|
|
|
|
CPPFLAGS += $(PC_CFLAGS)
|
|
LDLIBS += $(PC_LIBS)
|
|
|
|
LIBDIR ?= /usr/lib/
|
|
|
|
GBM_VERSION_MAJOR := 1
|
|
MINIGBM_VERSION := $(GBM_VERSION_MAJOR).0.0
|
|
MINIGBM_FILENAME := libminigbm.so.$(MINIGBM_VERSION)
|
|
|
|
CC_LIBRARY($(MINIGBM_FILENAME)): LDFLAGS += -Wl,-soname,libgbm.so.$(GBM_VERSION_MAJOR)
|
|
CC_LIBRARY($(MINIGBM_FILENAME)): $(C_OBJECTS)
|
|
|
|
all: CC_LIBRARY($(MINIGBM_FILENAME))
|
|
|
|
clean: CLEAN($(MINIGBM_FILENAME))
|
|
|
|
install: all
|
|
mkdir -p $(DESTDIR)/$(LIBDIR)
|
|
install -D -m 755 $(OUT)/$(MINIGBM_FILENAME) $(DESTDIR)/$(LIBDIR)
|
|
ln -sf $(MINIGBM_FILENAME) $(DESTDIR)/$(LIBDIR)/libgbm.so
|
|
ln -sf $(MINIGBM_FILENAME) $(DESTDIR)/$(LIBDIR)/libgbm.so.$(GBM_VERSION_MAJOR)
|
|
install -D -m 0644 $(SRC)/gbm.pc $(DESTDIR)$(LIBDIR)/pkgconfig/gbm.pc
|
|
install -D -m 0644 $(SRC)/gbm.h $(DESTDIR)/usr/include/gbm.h
|