From 2ad26034670dd1a1698e332a0c70f4127b1d44f5 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 4 Sep 2012 15:17:11 -0700 Subject: [PATCH] state_trackers/xa: Convert to automake --- configure.ac | 1 + src/gallium/state_trackers/xa/.gitignore | 1 + src/gallium/state_trackers/xa/Makefile | 64 ------------------------------- src/gallium/state_trackers/xa/Makefile.am | 47 +++++++++++++++++++++++ src/gallium/targets/xa-vmwgfx/Makefile | 4 +- 5 files changed, 51 insertions(+), 66 deletions(-) create mode 100644 src/gallium/state_trackers/xa/.gitignore delete mode 100644 src/gallium/state_trackers/xa/Makefile create mode 100644 src/gallium/state_trackers/xa/Makefile.am diff --git a/configure.ac b/configure.ac index c0e599b..1d17f59 100644 --- a/configure.ac +++ b/configure.ac @@ -2050,6 +2050,7 @@ AC_CONFIG_FILES([configs/current src/gallium/state_trackers/glx/Makefile src/gallium/state_trackers/vdpau/Makefile src/gallium/state_trackers/vega/Makefile + src/gallium/state_trackers/xa/Makefile src/gallium/targets/Makefile src/gallium/targets/opencl/Makefile src/gallium/winsys/Makefile diff --git a/src/gallium/state_trackers/xa/.gitignore b/src/gallium/state_trackers/xa/.gitignore new file mode 100644 index 0000000..f3c7a7c --- /dev/null +++ b/src/gallium/state_trackers/xa/.gitignore @@ -0,0 +1 @@ +Makefile diff --git a/src/gallium/state_trackers/xa/Makefile b/src/gallium/state_trackers/xa/Makefile deleted file mode 100644 index 2843d23..0000000 --- a/src/gallium/state_trackers/xa/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -TOP = ../../../.. -include $(TOP)/configs/current - -##### MACROS ##### - -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).o -XA_LIB_DEPS = - -COMMON_GALLIUM_SOURCES= - -SOURCES = \ - xa_tracker.c \ - xa_context.c \ - xa_renderer.c \ - xa_tgsi.c \ - xa_yuv.c \ - xa_composite.c -OBJECTS = $(SOURCES:.c=.o) - -##### RULES ##### - -.c.o: - $(CC) -c $(XA_CFLAGS) $(CFLAGS) $(XA_INCLUDES) $< - - -##### TARGETS ##### - -default: $(XA_LIB_NAME) - - -# Make the library -$(XA_LIB_NAME): depend $(OBJECTS) - $(CC) -Wl,-r -nostdlib -o $(XA_LIB_NAME) $(OBJECTS) $(CFLAGS) - -install: FORCE - -clean: - -rm -f *.o *~ - -rm -f *.lo - -rm -f *.la - -rm -f *.pc - -rm -rf .libs - -rm -f depend depend.bak - - -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/state_trackers/xa/Makefile.am b/src/gallium/state_trackers/xa/Makefile.am new file mode 100644 index 0000000..5b53ef9 --- /dev/null +++ b/src/gallium/state_trackers/xa/Makefile.am @@ -0,0 +1,47 @@ +# 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) +AM_CPPFLAGS = \ + -I$(top_srcdir)/src/gallium/ \ + -I$(top_srcdir)/src/gallium/winsys \ + -I$(top_srcdir)/src/gallium/drivers + +xa_includedir = $(includedir) +xa_include_HEADERS = \ + xa_composite.h \ + xa_context.h \ + xa_tracker.h + +noinst_LTLIBRARIES = libxatracker.la + +libxatracker_la_SOURCES = \ + xa_tracker.c \ + xa_context.c \ + xa_renderer.c \ + xa_tgsi.c \ + xa_yuv.c \ + xa_composite.c diff --git a/src/gallium/targets/xa-vmwgfx/Makefile b/src/gallium/targets/xa-vmwgfx/Makefile index f185e1ae..8e5565a 100644 --- a/src/gallium/targets/xa-vmwgfx/Makefile +++ b/src/gallium/targets/xa-vmwgfx/Makefile @@ -18,7 +18,7 @@ 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/libxatracker.o \ + $(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 \ @@ -53,7 +53,7 @@ endif default: $(TOP)/$(LIB_DIR)/gallium/$(XA_LIB_NAME) # Generate list of library visible symbols -xa_symbols: $(TOP)/src/gallium/state_trackers/xa/libxatracker.o +xa_symbols: $(TOP)/src/gallium/state_trackers/xa/.libs/libxatracker.a $(NM) $< | $(GREP) ' T ' | $(AWK) '{print $$3}' > $@ # Make the library -- 2.7.4