9b3fb0d90cd43e57613d05b8b90a3e33f445b455
[mesa.git] / src / gbm / Makefile.am
1 AUTOMAKE_OPTIONS = subdir-objects
2
3 pkgconfigdir = $(libdir)/pkgconfig
4 pkgconfig_DATA = main/gbm.pc
5
6 AM_CFLAGS = \
7 -D_OS_UNIX=1 \
8 -DMODULEDIR='"$(libdir)/gbm"' \
9 -I$(top_srcdir)/include \
10 -I$(top_srcdir)/src/gbm/main \
11 $(LIBUDEV_CFLAGS) \
12 $(LIBKMS_CFLAGS) \
13 $(DLOPEN_CFLAGS) \
14 $(DEFINES)
15
16 lib_LTLIBRARIES = libgbm.la
17 include_HEADERS = main/gbm.h
18
19 libgbm_la_SOURCES = \
20 main/gbm.c \
21 main/backend.c \
22 main/common.c
23 libgbm_la_LDFLAGS = -version-info 1:0
24 libgbm_la_LIBADD = $(LIBUDEV_LIBS) $(LIBKMS_LIBS) $(DLOPEN_LIBS)
25
26 if HAVE_EGL_PLATFORM_WAYLAND
27 AM_CPPFLAGS = -DHAVE_WAYLAND_PLATFORM
28 AM_CFLAGS += $(WAYLAND_CFLAGS)
29 libgbm_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la $(WAYLAND_LIBS)
30 endif
31
32 if HAVE_DRI
33 noinst_LTLIBRARIES = libgbm_dri.la
34 libgbm_dri_la_SOURCES = \
35 backends/dri/gbm_dri.c \
36 backends/dri/driver_name.c
37
38 libgbm_dri_la_CFLAGS = \
39 $(AM_CFLAGS) \
40 -DDEFAULT_DRIVER_DIR='"$(DRI_DRIVER_SEARCH_DIR)"' \
41 $(LIBDRM_CFLAGS)
42
43 libgbm_la_LIBADD += \
44 libgbm_dri.la $(top_builddir)/src/mapi/shared-glapi/libglapi.la $(LIBDRM_LIBS)
45 endif
46
47 all-local: libgbm.la
48 $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
49 ln -f .libs/libgbm.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libgbm.so