blob: 583b19664e88b1192d2b46d176df599605c6b173 [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)
Stéphane Marchesin8c7039c2014-09-18 18:27:41 -070027 install -D -m 755 $(OUT)/libgbm.so $(DESTDIR)/$(LIBDIR)
28 install -D -m 0644 $(SRC)/libgbm.pc $(DESTDIR)$(LIBDIR)/pkgconfig/libgbm.pc
29 install -D -m 0644 $(SRC)/gbm.h $(DESTDIR)/usr/include/gbm.h