# Copyright © 2012 Intel Corporation
+# Copyright © 2014 Emil Velikov
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
-SUBDIRS = drm sw
+include Makefile.sources
+include $(top_srcdir)/src/gallium/Automake.inc
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/src/mapi \
+ -I$(top_srcdir)/src/mesa \
+ -I$(top_builddir)/src/util \
+ -I$(top_srcdir)/src/mesa/drivers/dri/common \
+ $(GALLIUM_CFLAGS) \
+ $(LIBDRM_CFLAGS) \
+ $(VISIBILITY_CFLAGS)
+
+if HAVE_GALLIUM_SOFTPIPE
+AM_CPPFLAGS += \
+ -DGALLIUM_SOFTPIPE
+endif # HAVE_GALLIUM_SOFTPIPE
+
+noinst_LTLIBRARIES = libdri.la
+libdri_la_SOURCES = $(common_SOURCES)
+
+if HAVE_DRISW
+libdri_la_SOURCES += $(drisw_SOURCES)
+endif
+
+
+if HAVE_DRI2
+libdri_la_SOURCES += $(dri2_SOURCES)
+endif
+
+EXTRA_DIST = SConscript meson.build