libgallium: Convert to automake

This commit is contained in:
Tom Stellard
2012-08-24 11:48:32 -07:00
committed by Andreas Boll
parent 047fe04750
commit 80d290d47a
4 changed files with 60 additions and 48 deletions

View File

@@ -1713,7 +1713,7 @@ if test "x$enable_gallium_llvm" = xyes; then
LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
DEFINES="${DEFINES} -DHAVE_LLVM=`echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/0x0\10\2/g'`"
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT"
MESA_LLVM=1
dnl Check for Clang interanl headers
@@ -1727,9 +1727,11 @@ if test "x$enable_gallium_llvm" = xyes; then
fi
else
MESA_LLVM=0
LLVM_VERSION_INT=0
fi
else
MESA_LLVM=0
LLVM_VERSION_INT=0
fi
dnl Directory for XVMC libs
@@ -1965,6 +1967,9 @@ AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes)
AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
AM_CONDITIONAL(LLVM_NEEDS_FNORTTI, test $LLVM_VERSION_INT -ge 302)
AC_SUBST([GALLIUM_MAKE_DIRS])
AM_CONDITIONAL(NEED_LIBPROGRAM, test "x$with_gallium_drivers" != x -o \
@@ -2002,6 +2007,7 @@ AC_CONFIG_FILES([configs/current
src/egl/wayland/wayland-egl/Makefile
src/egl/wayland/wayland-egl/wayland-egl.pc
src/gallium/Makefile
src/gallium/auxiliary/Makefile
src/gallium/auxiliary/pipe-loader/Makefile
src/gallium/drivers/Makefile
src/gallium/drivers/r300/Makefile

1
src/gallium/auxiliary/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
Makefile

View File

@@ -1,47 +0,0 @@
TOP = ../../..
include $(TOP)/configs/current
LIBNAME = gallium
# get source lists
include Makefile.sources
C_SOURCES += $(GENERATED_SOURCES)
ifeq ($(MESA_LLVM),1)
C_SOURCES += \
$(GALLIVM_SOURCES)
CPP_SOURCES += \
$(GALLIVM_CPP_SOURCES)
# LLVM >= 3.2 requires -fno-rtti
ifeq ($(shell expr `echo $(LLVM_VERSION) | sed -e 's/\([0-9]\)\.\([0-9]\)/\10\2/g'` \>= 302),1)
CXXFLAGS += -fno-rtti
endif
endif
include ../Makefile.template
default install clean: %: subdirs-%
subdirs-%:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) $*) || exit 1; \
fi \
done
indices/u_indices_gen.c: indices/u_indices_gen.py
$(PYTHON2) $< > $@
indices/u_unfilled_gen.c: indices/u_unfilled_gen.py
$(PYTHON2) $< > $@
util/u_format_srgb.c: util/u_format_srgb.py
$(PYTHON2) $< > $@
util/u_format_table.c: util/u_format_table.py util/u_format_pack.py util/u_format_parse.py util/u_format.csv
$(PYTHON2) util/u_format_table.py util/u_format.csv > $@
# DO NOT DELETE

View File

@@ -0,0 +1,52 @@
AUTOMAKE_OPTIONS = subdir-objects
include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
SUBDIRS += pipebuffer
noinst_LTLIBRARIES = libgallium.la
AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/auxiliary/util \
$(GALLIUM_CFLAGS)
libgallium_la_SOURCES = \
$(C_SOURCES) \
$(GENERATED_SOURCES)
if HAVE_MESA_LLVM
AM_CFLAGS += \
$(LLVM_CFLAGS)
AM_CXXFLAGS = \
$(GALLIUM_CFLAGS) \
$(LLVM_CXXFLAGS)
if LLVM_NEEDS_FNORTTI
AM_CXXFLAGS += -fno-rtti
endif
libgallium_la_SOURCES += \
$(GALLIVM_SOURCES) \
$(GALLIVM_CPP_SOURCES)
endif
indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py
$(AM_V_GEN) $(PYTHON2) $< > $@
indices/u_unfilled_gen.c: $(srcdir)/indices/u_unfilled_gen.py
$(AM_V_GEN) $(PYTHON2) $< > $@
util/u_format_srgb.c: $(srcdir)/util/u_format_srgb.py
$(AM_V_GEN) $(PYTHON2) $< > $@
util/u_format_table.c: $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format_pack.py $(srcdir)/util/u_format_parse.py $(srcdir)/util/u_format.csv
$(AM_V_GEN) $(PYTHON2) $(srcdir)/util/u_format_table.py $(srcdir)/util/u_format.csv > $@
#XXX: Delete this when all targets are converted to automake.
all-local: libgallium.la
ln -f $(builddir)/.libs/libgallium.a $(builddir)/libgallium.a