1 # Copyright 2014 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
8 PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PC_DEPS))
9 PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS))
11 CPPFLAGS += -std=c99 -D_GNU_SOURCE=1
12 CFLAGS += -Wall -Wsign-compare -Wpointer-arith -Wcast-qual -Wcast-align
15 CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_exynos)
18 CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_intel)
21 CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_rockchip)
24 CPPFLAGS += $(PC_CFLAGS)
29 CC_LIBRARY(libgbm.so): $(C_OBJECTS)
31 all: CC_LIBRARY(libgbm.so)
33 clean: CLEAN(libgbm.so)
36 mkdir -p $(DESTDIR)/$(LIBDIR)
37 install -D -m 755 $(OUT)/libgbm.so $(DESTDIR)/$(LIBDIR)
38 install -D -m 0644 $(SRC)/libgbm.pc $(DESTDIR)$(LIBDIR)/pkgconfig/libgbm.pc
39 install -D -m 0644 $(SRC)/gbm.h $(DESTDIR)/usr/include/gbm.h