tests: AM_CPPFLAGS must include $(top_srcdir) instead of $(top_builddir).
[mesa.git] / src / glx / tests / Makefile.am
index a8a957d5b85d022a1ff14d0296b89a5e1f292da9..d940712a6c517dd655c72bcd01a4c52cb92e5983 100644 (file)
@@ -1,11 +1,13 @@
+if HAVE_SHARED_GLAPI
+AM_CFLAGS = $(PTHREAD_CFLAGS)
 AM_CPPFLAGS = \
-       -I$(top_builddir)/src/gtest/include \
-       -I$(top_builddir)/src/mapi \
-       -I$(top_builddir)/src/glx \
-       -I$(top_builddir)/include \
+       -I$(top_srcdir)/src/gtest/include \
+       -I$(top_srcdir)/src/mapi \
+       -I$(top_srcdir)/src/mesa \
+       -I$(top_srcdir)/src/glx \
+       -I$(top_srcdir)/include \
        $(X11_CFLAGS)
 
-if HAVE_XCB_GLX_CREATE_CONTEXT
 TESTS = glx-test
 check_PROGRAMS = glx-test
 
@@ -13,11 +15,12 @@ glx_test_SOURCES =                  \
        clientinfo_unittest.cpp         \
        create_context_unittest.cpp     \
        enum_sizes.cpp                  \
-       fake_glx_screen.cpp
+       fake_glx_screen.cpp             \
+       indirect_api.cpp
 
 glx_test_LDADD = \
        $(top_builddir)/src/glx/libglx.la \
        $(top_builddir)/src/gtest/libgtest.la \
-       -lpthread
-
+       $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
+       $(PTHREAD_LIBS)
 endif