summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Dawes <dawes@xfree86.org>2003-04-25 00:57:42 +0000
committerDavid Dawes <dawes@xfree86.org>2003-04-25 00:57:42 +0000
commitc3092ead6427d04b7067c1d7d95163c7aa7b75b1 (patch)
tree3917edfd7d973e30212970473d852bcb16713473
parent58650c3a9d53044a0ab463df41864ddb39238bab (diff)
Targets for building dristat and drmstat.
-rw-r--r--linux/Makefile.linux19
-rw-r--r--tests/drmstat.c9
2 files changed, 28 insertions, 0 deletions
diff --git a/linux/Makefile.linux b/linux/Makefile.linux
index 9082eb0e..af610c13 100644
--- a/linux/Makefile.linux
+++ b/linux/Makefile.linux
@@ -83,6 +83,8 @@ SISHEADERS= sis_drv.h sis_drm.h $(DRMHEADERS)
SHAREDSRC = $(DRMSHARED) $(MGASHARED) $(R128SHARED) $(RADEONSHARED)
+PROGS = dristat drmstat
+
CLEANFILES = *.o *.ko $(PROGS) .depend .*.flags .*.d .*.cmd
# VERSION is not defined from the initial invocation. It is defined when
@@ -227,6 +229,23 @@ clean cleandir:
$(MODULE_LIST)::
make -f Makefile.linux DRM_MODULES=$@ modules
+# Build test utilities
+
+PRGCFLAGS = $(CFLAGS) -g -ansi -pedantic -DPOSIX_C_SOURCE=199309L \
+ -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE \
+ -I. -I../../..
+
+DRMSTATLIBS = -L../../.. -L.. -ldrm -lxf86_os \
+ -L../../../../dummylib -ldummy -lm
+
+programs: $(PROGS)
+
+dristat: dristat.c
+ $(CC) $(PRGCFLAGS) $< -o $@
+
+drmstat: drmstat.c
+ $(CC) $(PRGCFLAGS) $< -o $@ $(DRMSTATLIBS)
+
else
# Check for kernel versions that we don't support.
diff --git a/tests/drmstat.c b/tests/drmstat.c
index 4edaeb38..9503fda9 100644
--- a/tests/drmstat.c
+++ b/tests/drmstat.c
@@ -414,3 +414,12 @@ int main(int argc, char **argv)
return r;
}
+
+void
+xf86VDrvMsgVerb(int scrnIndex, int type, int verb, const char *format,
+ va_list args)
+{
+ vfprintf(stderr, format, args);
+}
+
+int xf86ConfigDRI[10];