summaryrefslogtreecommitdiffstats
path: root/src/mesa/libdricore
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-05-24 13:59:21 -0700
committerEric Anholt <[email protected]>2012-05-29 12:39:48 -0700
commitf9d1562f356a66b70f13324e3360d63e8602a35f (patch)
treec1c9d0f0ce872528488dee7010fdd1b038162a05 /src/mesa/libdricore
parente86c40a84d241b954594f5ae7df9b9c3fc797a4e (diff)
automake: Convert dricore building to automake.
This is performed in a subdirectory to avoid needing to convert all of src/mesa/Makefile in one go. I can now cherry-pick a commit containing glapi XML changes, do "(cd src/mapi/glapi/gen && make) && make", and get a working driver. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/libdricore')
-rw-r--r--src/mesa/libdricore/.gitignore2
-rw-r--r--src/mesa/libdricore/Makefile.am79
2 files changed, 81 insertions, 0 deletions
diff --git a/src/mesa/libdricore/.gitignore b/src/mesa/libdricore/.gitignore
new file mode 100644
index 00000000000..282522db034
--- /dev/null
+++ b/src/mesa/libdricore/.gitignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/src/mesa/libdricore/Makefile.am b/src/mesa/libdricore/Makefile.am
new file mode 100644
index 00000000000..6fc4bbe80f7
--- /dev/null
+++ b/src/mesa/libdricore/Makefile.am
@@ -0,0 +1,79 @@
+# 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.
+
+TOP=$(top_srcdir)
+SRCDIR = $(srcdir)/..
+include ../sources.mak
+
+noinst_PROGRAMS =
+
+AM_CPPFLAGS = \
+ $(INCLUDE_DIRS) \
+ $(API_DEFINES) \
+ $(DEFINES)
+
+dridir = $(libdir)/dri
+
+AM_CFLAGS = $(CFLAGS_NOVISIBILITY) $(ASM_FLAGS) -DUSE_DRICORE
+AM_CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) $(ASM_FLAGS) -DUSE_DRICORE
+AM_CCASFLAGS = $(CFLAGS_NOVISIBILITY) $(ASM_FLAGS) -DUSE_DRICORE
+
+libdricore_la_SOURCES = \
+ $(MESA_FILES) \
+ $(MESA_CXX_FILES)
+libdricore_la_LDFLAGS = -module -avoid-version -shared
+libdricore_la_LIBADD = libdricore-asm.la
+
+# This is separated from libdricore to avoid conflics in object
+# outputs between main/clip.c and sparc/clip.c. The documented way to
+# do this is with the automake option subdir-objects, except that
+# option is broken in the presence of variable expansion in *_SOURCES.
+# I have no idea how that option is supposed to be usable as is.
+libdricore_asm_la_SOURCES =
+libdricore_asm_la_CCASFLAGS = $(AM_CCASFLAGS) -DWORKAROUND_AUTOMAKE_OBJ_FILE_CONFLICTS
+
+if HAVE_X86_ASM
+libdricore_asm_la_SOURCES += $(X86_FILES)
+endif
+
+if HAVE_X86_64_ASM
+libdricore_asm_la_SOURCES += $(X86_64_FILES)
+endif
+
+if HAVE_SPARC_ASM
+libdricore_asm_la_SOURCES += $(SPARC_FILES)
+endif
+
+if HAVE_DRICORE
+noinst_LTLIBRARIES = libdricore-asm.la
+dri_LTLIBRARIES = libdricore.la
+
+# Provide compatibility with scripts for the old Mesa build system for
+# a while by putting a link to the driver into /lib of the build tree.
+all-local: libdricore.la
+ $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
+ ln -f .libs/libdricore.so $(top_builddir)/$(LIB_DIR)/libdricore.so;
+endif
+
+CLEANFILES = \
+ $(top_builddir)/$(LIB_DIR)/libdricore.so
+
+-include $(DEPENDS)