Commit 4365bb5f authored by Adam Wujek's avatar Adam Wujek 💬

sdb-lib: store version information in libsdbfs

version information is stored in constant libsdbfs_version_s
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent c627379a
......@@ -27,12 +27,15 @@ OBJDUMP = $(CROSS_COMPILE)objdump
# calculate endianness at compile time
ENDIAN := $(shell ./check-endian $(CC))
GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS = -Wall -ggdb -O2
CFLAGS += -I../kernel/include/linux # for <sdb.h>
CFLAGS += -ffunction-sections -fdata-sections
CFLAGS += -Wno-pointer-sign
CFLAGS += $(ENDIAN) $(LINUXINCLUDE)
CFLAGS += $(EXTRACFLAGS)
CFLAGS += -DGIT_VERSION="\"$(GIT_VERSION)\""
LIB = libsdbfs.a
OBJS = glue.o access.o
......
......@@ -12,6 +12,7 @@
#include "libsdbfs.h"
static struct sdbfs *sdbfs_list;
const char * const libsdbfs_version_s = "libsdbfs version: " GIT_VERSION;
/* All fields unused by the caller are expected to be zeroed */
int sdbfs_dev_create(struct sdbfs *fs, int verbose)
......
......@@ -78,4 +78,6 @@ static inline uint64_t ntohll(uint64_t ll)
return htonll(ll);
}
extern const char * const libsdbfs_version_s;
#endif /* __LIBSDBFS_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