libdrm: Fix modetest/modeprint to use automake stuff.
authorEric Anholt <eric@anholt.net>
Wed, 17 Dec 2008 18:41:21 +0000 (10:41 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 17 Dec 2008 18:41:21 +0000 (10:41 -0800)
.gitignore
configure.ac
tests/Makefile.am
tests/modeprint/Makefile [deleted file]
tests/modeprint/Makefile.am [new file with mode: 0644]
tests/modeprint/test [deleted file]
tests/modetest/Makefile [deleted file]
tests/modetest/Makefile.am [new file with mode: 0644]
tests/modetest/test [deleted file]

index 796e74c..bd78034 100644 (file)
@@ -65,4 +65,5 @@ tests/gem_readwrite
 tests/openclose
 tests/setversion
 tests/updatedraw
-tests/modetest
+tests/modeprint/modeprint
+tests/modetest/modetest
index f4179fa..ccc58ef 100644 (file)
@@ -119,4 +119,6 @@ AC_OUTPUT([
        libdrm/intel/Makefile
        shared-core/Makefile
        tests/Makefile
+       tests/modeprint/Makefile
+       tests/modetest/Makefile
        libdrm.pc])
index 02b2ef0..e66d1c8 100644 (file)
@@ -15,7 +15,7 @@ libdrmtest_la_LIBADD = \
 
 LDADD = libdrmtest.la
 
-noinst_SUBDIRS = \
+SUBDIRS = \
        modeprint \
        modetest
 
diff --git a/tests/modeprint/Makefile b/tests/modeprint/Makefile
deleted file mode 100644 (file)
index 70788dc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-
-all: app
-
-#CFLAGS = -g -ansi -pedantic -DPOSIX_C_SOURCE=199309L \
-#        -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE \
-
-app: modeprint.c
-       @gcc $(CFLAGS) -o app -Wall -I../../libdrm -I../../shared-core -L../../libdrm/.libs -ldrm modeprint.c
-
-clean:
-       @rm -f app
-
-run: app
-       @sudo ./test
diff --git a/tests/modeprint/Makefile.am b/tests/modeprint/Makefile.am
new file mode 100644 (file)
index 0000000..77f8ec7
--- /dev/null
@@ -0,0 +1,13 @@
+AM_CFLAGS = \
+       -I$(top_srcdir)/shared-core \
+       -I$(top_srcdir)/libdrm/intel/ \
+       -I$(top_srcdir)/libdrm
+
+noinst_PROGRAMS = \
+       modeprint
+
+modeprint_SOURCES = \
+       modeprint.c
+modeprint_LDADD = \
+       $(top_builddir)/libdrm/libdrm.la \
+       $(top_builddir)/libdrm/intel/libdrm_intel.la
diff --git a/tests/modeprint/test b/tests/modeprint/test
deleted file mode 100644 (file)
index bd1952c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-LD_PRELOAD=../../libdrm/.libs/libdrm.so ./app $@
diff --git a/tests/modetest/Makefile b/tests/modetest/Makefile
deleted file mode 100644 (file)
index 8583ae8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-
-all: app
-
-#CFLAGS = -g -ansi -pedantic -DPOSIX_C_SOURCE=199309L \
-#        -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE \
-
-app: modetest.c
-       gcc $(CFLAGS) -o app -Wall -I../../libdrm -I../../libdrm/intel -I../../shared-core -L../../libdrm/.libs -L../../libdrm/intel/.libs -ldrm -ldrm_intel modetest.c
-
-clean:
-       @rm -f app
-
-run: app
-       sudo ./test
diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am
new file mode 100644 (file)
index 0000000..b89c489
--- /dev/null
@@ -0,0 +1,13 @@
+AM_CFLAGS = \
+       -I$(top_srcdir)/shared-core \
+       -I$(top_srcdir)/libdrm/intel/ \
+       -I$(top_srcdir)/libdrm
+
+noinst_PROGRAMS = \
+       modetest
+
+modetest_SOURCES = \
+       modetest.c
+modetest_LDADD = \
+       $(top_builddir)/libdrm/libdrm.la \
+       $(top_builddir)/libdrm/intel/libdrm_intel.la
diff --git a/tests/modetest/test b/tests/modetest/test
deleted file mode 100644 (file)
index 5bb552e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-export LD_LIBRARY_PATH=../../libdrm/.libs:../../libdrm/intel/.libs
-LD_PRELOAD=../../libdrm/.libs/libdrm.so ./app $@