blob: ad45cb3deffadb4364e62a7998e78c6bfac97f8e [file] [log] [blame]
Stéphane Marchesin25a26062014-09-12 16:18:59 -07001# 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.
4
5include common.mk
6
7PC_DEPS = libdrm
8PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PC_DEPS))
9PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS))
10
11CPPFLAGS += -std=c99 -D_GNU_SOURCE=1
12CFLAGS += -Wall -Wsign-compare -Wpointer-arith -Wcast-qual -Wcast-align
13
14CPPFLAGS += $(PC_CFLAGS)
15LDLIBS += $(PC_LIBS)
16
Stéphane Marchesin85afac42014-09-15 15:38:37 -070017LIBDIR ?= /usr/lib/
18
Stéphane Marchesin25a26062014-09-12 16:18:59 -070019CC_LIBRARY(libgbm.so): $(C_OBJECTS)
20
21all: CC_LIBRARY(libgbm.so)
22
23clean: CLEAN(libgbm.so)
24
25install: all
Stéphane Marchesin85afac42014-09-15 15:38:37 -070026 mkdir -p $(DESTDIR)/$(LIBDIR)
27 install -m 755 $(OUT)/libgbm.so $(DESTDIR)/$(LIBDIR)