summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/xa-vmwgfx
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/targets/xa-vmwgfx')
-rw-r--r--src/gallium/targets/xa-vmwgfx/.gitignore3
-rw-r--r--src/gallium/targets/xa-vmwgfx/Makefile110
-rw-r--r--src/gallium/targets/xa-vmwgfx/Makefile.am59
-rw-r--r--src/gallium/targets/xa-vmwgfx/xatracker.pc.in14
4 files changed, 65 insertions, 121 deletions
diff --git a/src/gallium/targets/xa-vmwgfx/.gitignore b/src/gallium/targets/xa-vmwgfx/.gitignore
index c9a68691316..f3c7a7c5da6 100644
--- a/src/gallium/targets/xa-vmwgfx/.gitignore
+++ b/src/gallium/targets/xa-vmwgfx/.gitignore
@@ -1,2 +1 @@
-exptmp
-xa_symbols
+Makefile
diff --git a/src/gallium/targets/xa-vmwgfx/Makefile b/src/gallium/targets/xa-vmwgfx/Makefile
deleted file mode 100644
index 8e5565aef53..00000000000
--- a/src/gallium/targets/xa-vmwgfx/Makefile
+++ /dev/null
@@ -1,110 +0,0 @@
-TOP = ../../../..
-include $(TOP)/configs/current
-
-##### MACROS #####
-
-XA_MAJOR = 1
-XA_MINOR = 0
-XA_TINY = 0
-XA_CFLAGS = -Wall -pedantic
-
-XA_INCLUDES= -I$(TOP)/src/gallium/ \
- -I$(TOP)/src/gallium/auxiliary \
- -I$(TOP)/src/gallium/include \
- -I$(TOP)/src/gallium/winsys \
- -I$(TOP)/src/gallium/drivers
-
-XA_LIB = xatracker
-XA_LIB_NAME = lib$(XA_LIB).so
-XA_LIB_GLOB = lib$(XA_LIB)*.so*
-XA_LIB_DEPS = \
- $(TOP)/src/gallium/state_trackers/xa/.libs/libxatracker.a \
- $(TOP)/src/gallium/winsys/svga/drm/libsvgadrm.a \
- $(TOP)/src/gallium/drivers/svga/libsvga.a \
- $(TOP)/src/gallium/drivers/trace/libtrace.a \
- $(TOP)/src/gallium/drivers/rbug/librbug.a
-
-
-COMMON_GALLIUM_SOURCES=
-
-SOURCES = vmw_target.c
-OBJECTS = $(SOURCES:.c=.o)
-
-ifeq ($(MESA_LLVM),1)
-LDFLAGS += $(LLVM_LDFLAGS)
-GALLIUM_AUXILIARIES += $(LLVM_LIBS)
-LD=$(CXX)
-else
- ifeq ($(LINK_WITH_CXX),1)
- LD=$(CXX)
- else
- LD=$(CC)
- endif
-endif
-
-##### RULES #####
-
-.c.o:
- $(CC) -c $(XA_CFLAGS) $(CFLAGS) $(XA_INCLUDES) $<
-
-
-##### TARGETS #####
-
-default: $(TOP)/$(LIB_DIR)/gallium/$(XA_LIB_NAME)
-
-# Generate list of library visible symbols
-xa_symbols: $(TOP)/src/gallium/state_trackers/xa/.libs/libxatracker.a
- $(NM) $< | $(GREP) ' T ' | $(AWK) '{print $$3}' > $@
-
-# Make the library
-$(TOP)/$(LIB_DIR)/gallium/$(XA_LIB_NAME): depend $(OBJECTS) $(XA_LIB_DEPS) \
- xa_symbols
- $(MKLIB) -o $(XA_LIB) -linker $(LD) -ldflags '$(LDFLAGS)' \
- -major $(XA_MAJOR) -minor $(XA_MINOR) -patch $(XA_TINY) \
- $(MKLIB_OPTIONS) \
- -exports xa_symbols \
- -install $(TOP)/$(LIB_DIR)/gallium \
- $(OBJECTS) $(XA_LIB_DEPS) $(GALLIUM_AUXILIARIES)
-
-# xa pkgconfig file
-pcedit = sed \
- -e 's,@INSTALL_DIR@,$(INSTALL_DIR),g' \
- -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),g' \
- -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),g' \
- -e 's,@VERSION@,$(XA_MAJOR).$(XA_MINOR).$(XA_TINY),g' \
- -e 's,@XA_PC_REQ_PRIV@,$(XA_PC_REQ_PRIV),g' \
- -e 's,@XA_PC_LIB_PRIV@,$(XA_PC_LIB_PRIV),g' \
- -e 's,@XA_PC_CFLAGS@,$(XA_PC_CFLAGS),g' \
- -e 's,@XA_LIB@,$(XA_LIB),g'
-xatracker.pc: xatracker.pc.in
- $(pcedit) $< > $@
-
-install: xatracker.pc
- $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
- $(INSTALL) -m 644 $(TOP)/src/gallium/state_trackers/xa/xa_tracker.h $(DESTDIR)$(INSTALL_INC_DIR)
- $(INSTALL) -m 644 $(TOP)/src/gallium/state_trackers/xa/xa_context.h $(DESTDIR)$(INSTALL_INC_DIR)
- $(INSTALL) -m 644 $(TOP)/src/gallium/state_trackers/xa/xa_composite.h $(DESTDIR)$(INSTALL_INC_DIR)
- $(MINSTALL) -m 755 $(TOP)/$(LIB_DIR)/gallium/$(XA_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) -m 644 xatracker.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
-
-clean:
- -rm -f *.o *~
- -rm -f *.lo
- -rm -f *.la
- -rm -f *.pc
- -rm -rf .libs
- -rm -f depend depend.bak exptmp xa_symbols
-
-
-depend: $(SOURCES)
- @ echo "running $(MKDEP)"
- @ rm -f depend
- @ touch depend
- @ $(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(XA_INCLUDES) $(SOURCES) \
- > /dev/null
-
--include depend
-
-FORCE:
diff --git a/src/gallium/targets/xa-vmwgfx/Makefile.am b/src/gallium/targets/xa-vmwgfx/Makefile.am
new file mode 100644
index 00000000000..01cff4b535e
--- /dev/null
+++ b/src/gallium/targets/xa-vmwgfx/Makefile.am
@@ -0,0 +1,59 @@
+# 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.
+
+include $(top_srcdir)/src/gallium/Automake.inc
+
+AM_CFLAGS = \
+ -Wall -pedantic \
+ $(GALLIUM_CFLAGS) \
+ $(XORG_CFLAGS)
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/gallium/drivers \
+ -I$(top_srcdir)/src/gallium/winsys
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xatracker.pc
+
+lib_LTLIBRARIES = libxatracker.la
+
+libxatracker_la_SOURCES = vmw_target.c
+
+libxatracker_la_LDFLAGS = -version-number $(XA_MAJOR):$(XA_MINOR):$(XA_TINY)
+
+libxatracker_la_LIBADD = \
+ $(top_builddir)/src/gallium/auxiliary/libgallium.la \
+ $(top_builddir)/src/gallium/state_trackers/xa/libxatracker.la \
+ $(top_builddir)/src/gallium/winsys/svga/drm/libsvgadrm.la \
+ $(top_builddir)/src/gallium/drivers/svga/libsvga.la \
+ $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
+ $(top_builddir)/src/gallium/drivers/rbug/librbug.la
+
+if HAVE_MESA_LLVM
+libxatracker_la_LDFLAGS += $(LLVM_LDFLAGS)
+libxatracker_la_LIBADD += $(LLVM_LIBS)
+endif
+
+# 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: libxatracker.la
+ $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
+ ln -f .libs/libxatracker.so* $(top_builddir)/$(LIB_DIR)/gallium/
diff --git a/src/gallium/targets/xa-vmwgfx/xatracker.pc.in b/src/gallium/targets/xa-vmwgfx/xatracker.pc.in
index 4ea2f4057d7..c99d8d65e88 100644
--- a/src/gallium/targets/xa-vmwgfx/xatracker.pc.in
+++ b/src/gallium/targets/xa-vmwgfx/xatracker.pc.in
@@ -1,13 +1,9 @@
-prefix=@INSTALL_DIR@
+prefix=@prefix@
exec_prefix=${prefix}
-libdir=@INSTALL_LIB_DIR@
-includedir=@INSTALL_INC_DIR@
+libdir=@libdir@
+includedir=@includedir@
Name: xatracker
Description: Xorg Gallium3D acceleration library
-Requires:
-Requires.private: @XA_PC_REQ_PRIV@
-Version: @VERSION@
-Libs: -L${libdir} -l@XA_LIB@
-Libs.private: @XA_PC_LIB_PRIV@
-Cflags: -I${includedir} @XA_PC_CFLAGS@
+Version: @XA_VERSION@
+Libs: -L${libdir} -lxatracker