Commit 35c1a5b5 authored by Michel Arruat's avatar Michel Arruat Committed by Adam Wujek

liblinux: add git version and build info for liblinux

Signed-off-by: Michel Arruat's avatarMichel Arruat <michel.arruat@cern.ch>
parent 546676e8
......@@ -7,7 +7,11 @@ SUPPORT_CERN_VMEBRIDGE ?= n
LIB = libdevmap.a
LOBJ := devmap.o
GIT_VER ?= $(shell git describe --always --dirty)
GIT_USR ?= $(shell git config --get-all user.name)
CFLAGS = -Wall -ggdb -fPIC -Werror -I./ -I../include
CFLAGS += -D__GIT_VER__="\"$(GIT_VER)\"" -D__GIT_USR__="\"$(GIT_USR)\""
LDFLAGS = -L.
ifeq ($(SUPPORT_CERN_VMEBRIDGE), y)
......
......@@ -16,6 +16,9 @@
#include "libdevmap.h"
static const char * const libdevmap_version_s = "libdevmap version: "
__GIT_VER__ ", by " __GIT_USR__ " " __TIME__ " " __DATE__;
#ifdef SUPPORT_CERN_VMEBRIDGE
#include <libvmebus.h>
......@@ -319,7 +322,7 @@ out:
return NULL;
}
char *dev_mapping_help()
const char * const dev_mapping_help()
{
static char help_msg[] =
"Device mapping options: \n"
......@@ -334,3 +337,8 @@ char *dev_mapping_help()
return help_msg;
}
const char * const dev_get_version()
{
return libdevmap_version_s;
}
......@@ -35,7 +35,9 @@ extern struct mapping_desc *dev_map(struct mapping_args *map_args,
uint32_t map_length);
extern void dev_unmap(struct mapping_desc *dev);
extern struct mapping_args *dev_parse_mapping_args(int argc, char *argv[]);
extern char *dev_mapping_help();
extern const char * const dev_mapping_help();
extern const char * const dev_get_version();
/** @}*/
#endif //__LIBDEVMAP_H__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment