tests: fix build with alternate X11 paths.
[profile/ivi/libva.git] / test / basic / Makefile.am
index 49a54a0..21f48dd 100644 (file)
 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-bin_PROGRAMS = test_01 test_02 test_03 test_04 test_05 test_06 \
-               test_07 test_08 test_09 test_10 test_11
-
-AM_CFLAGS = -I$(top_srcdir)/va -I$(top_srcdir)/src/x11
-
-TEST_LIBS = $(top_srcdir)/va/$(libvabackendlib)
+noinst_PROGRAMS = \
+       test_01                 \
+       test_02                 \
+       test_03                 \
+       test_04                 \
+       test_05                 \
+       test_06                 \
+       test_07                 \
+       test_08                 \
+       test_09                 \
+       test_10                 \
+       test_11                 \
+       $(NULL)
+
+AM_CFLAGS = \
+       -DIN_LIBVA              \
+       -I$(top_srcdir)         \
+       $(X11_CFLAGS)           \
+       $(NULL)
+
+TEST_LIBS = \
+       $(top_builddir)/va/libva.la     \
+       $(top_builddir)/va/libva-x11.la \
+       $(X11_LIBS)                     \
+       $(NULL)
 
 test_01_LDADD = $(TEST_LIBS)
 test_01_SOURCES = test_01.c
@@ -60,9 +79,9 @@ test_10_SOURCES = test_10.c
 test_11_LDADD = $(TEST_LIBS)
 test_11_SOURCES = test_11.c
 
-EXTRA_DIST = test_common.c
+EXTRA_DIST = test_common.c test_x11.c
 
-valgrind:      $(bin_PROGRAMS)
-       for a in $(bin_PROGRAMS); do \
+valgrind:      $(noinst_PROGRAMS)
+       for a in $(noinst_PROGRAMS); do \
                valgrind --leak-check=full --show-reachable=yes .libs/$$a; \
        done