summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-02-06 12:12:53 +0100
committerEric Anholt <[email protected]>2012-02-29 11:52:41 -0800
commite5f895485e03ac60efcb3f6f83ec1d3e33ef7ec2 (patch)
treefb02eb9d6be5c5408bf170bb9d4ff44ada293941 /src/egl/drivers/dri2
parent88612029f6ce9d2717220a0ef31bfe71a8c85529 (diff)
egl/drivers: Convert to automake.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/Makefile45
-rw-r--r--src/egl/drivers/dri2/Makefile.am62
2 files changed, 62 insertions, 45 deletions
diff --git a/src/egl/drivers/dri2/Makefile b/src/egl/drivers/dri2/Makefile
deleted file mode 100644
index 1086ce28be5..00000000000
--- a/src/egl/drivers/dri2/Makefile
+++ /dev/null
@@ -1,45 +0,0 @@
-# src/egl/drivers/dri2/Makefile
-
-TOP = ../../../..
-include $(TOP)/configs/current
-
-EGL_DRIVER = egl_dri2
-EGL_SOURCES = egl_dri2.c common.c
-
-EGL_INCLUDES = \
- -I$(TOP)/include \
- -I$(TOP)/src/egl/main \
- -I$(TOP)/src/mapi \
- -I$(TOP)/src/gbm/main \
- -I$(TOP)/src/gbm/backends/dri \
- -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
- $(LIBUDEV_CFLAGS) \
- $(LIBDRM_CFLAGS)
-
-EGL_LIBS = $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
-
-ifeq ($(SHARED_GLAPI),1)
-EGL_CFLAGS += -DHAVE_SHARED_GLAPI
-endif
-
-ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
-EGL_SOURCES += platform_x11.c
-EGL_INCLUDES += -DHAVE_X11_PLATFORM $(XCB_DRI2_CFLAGS)
-EGL_LIBS += $(XCB_DRI2_LIBS)
-endif
-
-ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
-EGL_SOURCES += platform_drm.c
-EGL_INCLUDES += -DHAVE_DRM_PLATFORM
-endif
-
-ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
-EGL_SOURCES += platform_wayland.c
-EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \
- -I$(TOP)/src/egl/wayland/wayland-egl \
- -I$(TOP)/src/egl/wayland/wayland-drm
-EGL_LIBS += $(WAYLAND_LIBS) \
- $(TOP)/src/egl/wayland/wayland-drm/.libs/libwayland-drm.a
-endif
-
-include ../Makefile.template
diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am
new file mode 100644
index 00000000000..e4d4abb966d
--- /dev/null
+++ b/src/egl/drivers/dri2/Makefile.am
@@ -0,0 +1,62 @@
+# Copyright © 2012 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+AM_CFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/egl/main \
+ -I$(top_srcdir)/src/gbm/main \
+ -I$(top_srcdir)/src/gbm/backends/dri \
+ -I$(top_srcdir)/src/egl/wayland/wayland-egl \
+ -I$(top_srcdir)/src/egl/wayland/wayland-drm \
+ $(DEFINES) \
+ $(LIBDRM_CFLAGS) \
+ $(LIBUDEV_CFLAGS) \
+ -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
+
+noinst_LTLIBRARIES = libegl_dri2.la
+
+libegl_dri2_la_SOURCES = \
+ egl_dri2.c \
+ common.c
+
+libegl_dri2_la_LIBADD = \
+ $(EGL_LIB_DEPS)
+
+if HAVE_SHARED_GLAPI
+AM_CFLAGS += -DHAVE_SHARED_GLAPI
+endif
+
+if HAVE_EGL_PLATFORM_X11
+libegl_dri2_la_SOURCES += platform_x11.c
+AM_CFLAGS += -DHAVE_X11_PLATFORM
+AM_CFLAGS += $(XCB_DRI2_CFLAGS)
+endif
+
+if HAVE_EGL_PLATFORM_WAYLAND
+libegl_dri2_la_SOURCES += platform_wayland.c
+AM_CFLAGS += -DHAVE_WAYLAND_PLATFORM
+AM_CFLAGS += $(WAYLAND_CFLAGS)
+endif
+
+if HAVE_EGL_PLATFORM_DRM
+libegl_dri2_la_SOURCES += platform_drm.c
+AM_CFLAGS += -DHAVE_DRM_PLATFORM
+endif