diff options
author | Austin Yuan <shengquan.yuan@intel.com> | 2009-05-12 07:12:30 -0400 |
---|---|---|
committer | Austin Yuan <shengquan.yuan@intel.com> | 2009-05-12 07:12:30 -0400 |
commit | b817eb2feb0f691dfcf543f2f3d1f7bba415b878 (patch) | |
tree | 1fe8a940dfab84a0258428513259778541bfea41 /src | |
parent | 1b38fc90b2054d25d04004d2101faaea86571e97 (diff) | |
download | libva-b817eb2feb0f691dfcf543f2f3d1f7bba415b878.tar.gz |
Added build information (build date/time, git commit point) into the librarymenlow-port-05142009_Alpha1.405142009_Alpha1.4
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 10 | ||||
-rw-r--r-- | src/va.c | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 1cadc80..fbcdeda 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,6 +30,16 @@ libva_la_LDFLAGS = -version-number 0:30:0 -no-undefined libva_la_LIBADD = $(LIBVA_LIBS) -ldl -ldrm -lX11 -lXext -lXv X11/libva_X11.la CFLAGS = -ansi -O2 +nodist_libva_la_SOURCES = va_version.h +BUILT_SOURCES = va_version.h + +CLEANFILES = va_version.h + +va_version.h: Makefile + echo "#define VA_BUILD_DATE \"$(shell date +'%Y%m%d') $(shell date +'1%H%M%S') \"" > va_version.h + echo "#define VA_BUILD_GIT \"($(shell git log | head -n1 | cut -f2 -d' ')) \" " >> va_version.h + + SUBDIRS = X11 libva_la_SOURCES = va.c @@ -25,6 +25,8 @@ #include "va.h" #include "va_backend.h" +#include "va_version.h" + #include <assert.h> #include <stdarg.h> #include <stdio.h> @@ -32,6 +34,8 @@ #include <dlfcn.h> #include <unistd.h> +#define VA_STR_VERSION VA_BUILD_DATE VA_BUILD_GIT + #define VA_MAJOR_VERSION 0 #define VA_MINOR_VERSION 30 #define DRIVER_INIT_FUNC "__vaDriverInit_0_30" @@ -325,6 +329,8 @@ VAStatus vaInitialize ( va_debug_trace = (getenv("LIBVA_DEBUG_TRACE") != NULL); + va_infoMessage("libva build on %s\n", VA_STR_VERSION); + vaStatus = va_getDriverName(dpy, &driver_name); va_infoMessage("va_getDriverName() returns %d\n", vaStatus); |