swrast: add correct include for out-of-tree builds
[mesa.git] / src / gallium / targets / dri-swrast / Makefile.am
index 82fcfd294d2e501c508e656d20e49a6582459339..6b629df307d53b36464768744f58baf2aed6c081 100644 (file)
@@ -25,13 +25,15 @@ include $(top_srcdir)/src/gallium/Automake.inc
 AM_CFLAGS = \
        $(GALLIUM_CFLAGS) \
        $(PTHREAD_CFLAGS) \
-       $(LIBDRM_CFLAGS)
+       $(LIBDRM_CFLAGS) \
+       $(VISIBILITY_CFLAGS)
 AM_CPPFLAGS = \
        -I$(top_srcdir)/src/gallium/winsys/sw/dri \
        -I$(top_srcdir)/src/gallium/drivers \
        -I$(top_srcdir)/src/gallium/winsys \
        -I$(top_srcdir)/src/mesa \
        -I$(top_srcdir)/src/mapi \
+       -I$(top_builddir)/src/mesa/drivers/dri/common \
        -DGALLIUM_RBUG \
        -DGALLIUM_TRACE \
        -DGALLIUM_SOFTPIPE \
@@ -43,10 +45,10 @@ dri_LTLIBRARIES = swrast_dri.la
 swrast_dri_la_SOURCES = \
        swrast_drm_api.c \
        $(top_srcdir)/src/mesa/drivers/dri/common/utils.c \
-       $(top_srcdir)/src/mesa/drivers/dri/common/drisw_util.c \
+       $(top_srcdir)/src/mesa/drivers/dri/common/dri_util.c \
        $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
 
-swrast_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
+swrast_dri_la_LDFLAGS = $(DRI_DRIVER_LDFLAGS)
 
 swrast_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/libmesagallium.la \
@@ -58,17 +60,12 @@ swrast_dri_la_LIBADD = \
        $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
        $(GALLIUM_DRI_LIB_DEPS)
 
-if HAVE_MESA_LLVM
-swrast_dri_la_LINK = $(CXXLINK) $(swrast_dri_la_LDFLAGS)
-# Mention a dummy pure C++ file to trigger generation of the $(LINK) variable
-nodist_EXTRA_swrast_dri_la_SOURCES = dummy-cpp.cpp
+nodist_EXTRA_swrast_dri_la_SOURCES = dummy.cpp
 
+if HAVE_MESA_LLVM
 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
+swrast_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
 swrast_dri_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS)
-else
-swrast_dri_la_LINK = $(LINK) $(swrast_dri_la_LDFLAGS)
-# Mention a dummy pure C file to trigger generation of the $(LINK) variable
-nodist_EXTRA_swrast_dri_la_SOURCES = dummy-c.c
 endif
 
 # Provide compatibility with scripts for the old Mesa build system for